Skip to content

Ace your MAANG+ interviews with this curated list of 100 essential DSA problems. From arrays to graphs, master every concept with detailed solutions and expert tips. Start your path to a top-tier tech job today!

License

Notifications You must be signed in to change notification settings

VikashPR/MAANG-Interview-Prep-100-DSA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”₯ The Ultimate MAANG+ DSA Interview Prep List (2025) πŸš€

GitHub stars GitHub forks PRs Welcome License Contributors

Data Structures Algorithms LeetCode Ready Built By The Community


🎯 Goal: This isn't just another list. It's a strategically curated collection of ~100 high-impact Data Structures and Algorithms problems frequently encountered in interviews at MAANG (Meta, Apple, Amazon, Netflix, Google) and other top-tier tech companies. Master these, and you'll build the core problem-solving muscle needed to excel. πŸ’ͺ

πŸ’‘ How This List Was Curated:

  • Cross-Referencing: Problems selected appear consistently across highly respected resources like:
    • LeetCode's "Top Interview Questions" (by frequency).
    • Blind 75: A list crowdsourced from Blind (an anonymous professional network).
    • NeetCode 150: A popular curated list covering essential patterns.
    • Aggregated interview experiences shared on LeetCode Discuss, Glassdoor, and other platforms.
  • Concept Coverage: Ensuring all fundamental DSA topics and common patterns are represented.
  • MAANG+ Focus: Prioritizing question types and difficulties commonly reported in MAANG+ interviews.
  • Community Validation: Incorporating problems widely recognized by the competitive programming and interview prep community.

Disclaimer: While based on extensive research and community data, exact interview questions vary. This list focuses on building the underlying skills tested by recurring problem patterns.


πŸ“š Table of Contents

Click the links to jump to a section!

  1. πŸ“Š Array
  2. ✍️ String
  3. ⛓️ Linked List
  4. βš–οΈ Two Pointers
  5. πŸ–ΌοΈ Sliding Window
  6. πŸ₯ž Stack
  7. 🌳 Tree (BFS/DFS/Traversal)
  8. 🌲 Tree (Advanced & BST)
  9. πŸ₯ž Heap / Priority Queue
  10. πŸ”™ Backtracking
  11. πŸ’» Dynamic Programming (1D)
  12. 🧱 Dynamic Programming (2D & Advanced)
  13. 🌐 Graph (BFS/DFS/Union-Find)
  14. πŸ—ΊοΈ Graph (Advanced & Shortest Path)
  15. πŸ” Binary Search
  16. πŸ’‘ Greedy
  17. πŸ“ Math & Bit Manipulation
  18. 🧩 Intervals

  • Legend:
    • Easy
    • Medium
    • Hard
    • ⭐ = Especially High Frequency / Foundational

πŸ“Š Array

# Problem Difficulty Concepts Why MAANG+ Loves It Source Hint*
1 ⭐ Two Sum Easy Hashing The quintessential hash map problem. Checks basic data structure usage. LC Top, Blind 75
2 ⭐ Best Time to Buy and Sell Stock Easy Sliding Window, Greedy Simple optimization, finding min/max efficiently in one pass. LC Top, Blind 75
3 Contains Duplicate Easy Hashing, Set Basic set usage for uniqueness checks. LC Top
4 ⭐ Product of Array Except Self Medium Prefix/Suffix Products Clever array manipulation without division. Tests thinking outside the box. LC Top, Blind 75
5 ⭐ Maximum Subarray Medium Kadane's Algo, DP The most famous DP intro problem (can be solved greedily). Fundamental pattern. LC Top, Blind 75
6 Maximum Product Subarray Medium DP, Array Traversal Variation of Max Subarray, handles negative numbers. Tests edge cases. LC Top, Blind 75
7 Find Minimum in Rotated Sorted Array Medium Binary Search Classic modified binary search on rotated arrays. LC Top, Blind 75
8 ⭐ Search in Rotated Sorted Array Medium Binary Search Extends the above, requires careful boundary condition handling. LC Top, Blind 75
9 ⭐ 3Sum Medium Sorting, Two Pointers Foundational k-sum problem. Tests handling duplicates and two-pointer technique. LC Top, Blind 75
10 Container With Most Water Medium Two Pointers Classic two-pointer optimization problem. LC Top, Blind 75
11 Next Permutation Medium Array Manipulation Understanding lexicographical order and in-place swaps. LC Top
12 Find the Duplicate Number Medium Cycle Detection (Floyd's) Maps array problem to linked list cycle detection. Clever and efficient. LC Top

*Source Hint: Indicates sources where this problem is frequently listed (LC Top = LeetCode Top Interview Qs, Blind 75, NeetCode 150). This is indicative, not exhaustive.


✍️ String

# Problem Difficulty Concepts Why MAANG+ Loves It Source Hint*
13 ⭐ Longest Substring Without Repeating Characters Medium Sliding Window, Hashing The canonical sliding window problem. Tests efficient substring analysis. LC Top, Blind 75
14 ⭐ Longest Repeating Character Replacement Medium Sliding Window, Hashing Advanced sliding window requiring careful window condition management. LC Top, Blind 75
15 ⭐ Minimum Window Substring Hard Sliding Window, Hashing The definitive challenging sliding window problem. Tests complex state tracking. LC Top, Blind 75
16 ⭐ Valid Anagram Easy Hashing, Sorting Fundamental check for character counts. Basic but essential. LC Top, Blind 75
17 ⭐ Group Anagrams Medium Hashing, Sorting Grouping items based on a derived key (sorted string or char count). Common pattern. LC Top, Blind 75
18 ⭐ Valid Parentheses Easy Stack Classic stack application for matching pairs. LC Top, Blind 75
19 ⭐ Valid Palindrome Easy Two Pointers, String Basic two-pointer technique for symmetry checks, ignoring non-alphanumerics. LC Top, Blind 75
20 ⭐ Longest Palindromic Substring Medium Expand Around Center, DP Finding optimal substructures. Expand-around-center is often preferred. LC Top, Blind 75
21 Palindromic Substrings Medium Expand Around Center, DP Counting all palindromic substrings. Similar logic to #20 but counting instead of finding max. LC Top, Blind 75
22 Encode and Decode Strings (Premium) Medium String Design, Delimiter Practical problem often asked in system design contexts or phone screens. Tests edge cases. Blind 75, NeetCode

⛓️ Linked List

# Problem Difficulty Concepts Why MAANG+ Loves It Source Hint*
23 ⭐ Reverse Linked List Easy Iteration, Recursion The absolute fundamental linked list manipulation. LC Top, Blind 75
24 ⭐ Linked List Cycle Easy Floyd's Cycle Detection Classic application of the Tortoise and Hare algorithm. LC Top, Blind 75
25 ⭐ Merge Two Sorted Lists Easy Pointers, Iteration Foundational merging logic, basis for Merge Sort. LC Top, Blind 75
26 ⭐ Merge k Sorted Lists Hard Heap (Priority Queue), D&C Scalable merging. Tests heap usage or divide-and-conquer approach. LC Top, Blind 75
27 Remove Nth Node From End of List Medium Two Pointers (Fast/Slow) Common two-pointer pattern for finding elements relative to the end. LC Top, Blind 75
28 Reorder List Medium Find Middle, Reverse, Merge Combines multiple core list operations. Good test of modular thinking. LC Top, Blind 75

(Sections for Two Pointers, Sliding Window, Stack, Trees, Heap, Backtracking, DP, Graphs, Binary Search, Greedy, Math/Bit Manipulation, Intervals would follow a similar detailed format)


βš–οΈ Two Pointers

(Problems like 3Sum, Container With Most Water, Valid Palindrome are already listed, but this section could include others primarily solved with this technique if not covered elsewhere)

# Problem Difficulty Concepts Why MAANG+ Loves It Source Hint*
29 Sort Colors Medium Two Pointers Dutch National Flag problem. Efficient in-place partitioning. LC Top
30 Trapping Rain Water Hard Two Pointers, DP, Stack Multiple solutions exist. Tests optimization and insights. LC Top, NeetCode

πŸ–ΌοΈ Sliding Window

(Many already covered in Array/String sections, this ensures the pattern is highlighted)

# Problem Difficulty Concepts Why MAANG+ Loves It Source Hint*
31 Permutation in String Medium Sliding Window, Hashing Fixed-size window check using frequency maps. LC Top, Blind 75
32 Best Time to Buy and Sell Stock Easy Sliding Window, Greedy (Re-listed for pattern emphasis) Simple window optimization. LC Top, Blind 75
33 Longest Substring Without Repeating Characters Medium Sliding Window, Hashing (Re-listed) The classic dynamic window size problem. LC Top, Blind 75

πŸ₯ž Stack

# Problem Difficulty Concepts Why MAANG+ Loves It Source Hint*
34 ⭐ Valid Parentheses Easy Stack (Re-listed) Fundamental stack usage for matching. LC Top, Blind 75
35 Min Stack Medium Stack Design Designing a stack with O(1) min retrieval. Tests data structure design. LC Top, NeetCode
36 Evaluate Reverse Polish Notation Medium Stack Direct stack application for expression evaluation. LC Top
37 Daily Temperatures Medium Monotonic Stack Classic "next greater element" pattern using a monotonic stack. LC Top, NeetCode
38 Largest Rectangle in Histogram Hard Monotonic Stack Challenging application of monotonic stack for area calculation. LC Top, NeetCode

🌳 Tree (BFS/DFS/Traversal)

# Problem Difficulty Concepts Why MAANG+ Loves It Source Hint*
39 ⭐ Maximum Depth of Binary Tree Easy DFS, Recursion Basic recursive tree traversal. LC Top, Blind 75
40 ⭐ Same Tree Easy DFS, Recursion Basic structural comparison using recursion. LC Top, Blind 75
41 ⭐ Invert Binary Tree Easy DFS/BFS, Recursion Famous, simple tree manipulation via recursion or iteration. LC Top, Blind 75
42 Subtree of Another Tree Easy DFS, Recursion Recursive check involving a helper function for subtree matching. LC Top, Blind 75
43 ⭐ Binary Tree Level Order Traversal Medium BFS, Queue The canonical BFS application on trees. LC Top, Blind 75
44 Binary Tree Right Side View Medium BFS, DFS Variation of level order traversal (finding the last node at each level). LC Top, NeetCode
45 Diameter of Binary Tree Easy DFS, Recursion Calculating longest path via recursive depth calculation. LC Top, NeetCode

🌲 Tree (Advanced & BST)

# Problem Difficulty Concepts Why MAANG+ Loves It Source Hint*
46 ⭐ Lowest Common Ancestor of a Binary Search Tree Medium BST Properties, DFS Utilizes BST properties for efficient LCA finding. LC Top, Blind 75
47 ⭐ Validate Binary Search Tree Medium DFS, Recursion, Range Checking BST validity requires passing down min/max constraints. Important detail. LC Top, Blind 75
48 ⭐ Kth Smallest Element in a BST Medium Inorder Traversal, DFS Leverages the inorder traversal property of BSTs. LC Top, Blind 75
49 Construct Binary Tree from Preorder and Inorder Traversal Medium Recursion, Hashing Classic tree construction problem using traversal properties. LC Top, Blind 75
50 ⭐ Binary Tree Maximum Path Sum Hard DFS, Recursion Tricky recursion where path can start/end anywhere. Requires careful state return. LC Top, Blind 75
51 Serialize and Deserialize Binary Tree Hard DFS/BFS, String Design problem involving tree representation as a string. Tests clear encoding/decoding. LC Top, Blind 75
52 Implement Trie (Prefix Tree) Medium Trie, Design Foundational for many string/dictionary problems. LC Top, Blind 75
53 Design Add and Search Words Data Structure Medium Trie, DFS, Backtracking Extends Trie with wildcard search. Tests recursive search logic. LC Top, Blind 75
54 Word Search II Hard Trie, Backtracking, DFS Combines Trie efficiency with grid backtracking. Highly practical. LC Top, Blind 75

πŸ₯ž Heap / Priority Queue

# Problem Difficulty Concepts Why MAANG+ Loves It Source Hint*
55 ⭐ Top K Frequent Elements Medium Hashing, Heap, QuickSelect Finding most frequent items efficiently. Tests Heap or QuickSelect usage. LC Top, Blind 75
56 Kth Largest Element in an Array Medium Heap, QuickSelect Similar to Top K, focuses on finding the specific Kth element. LC Top, NeetCode
57 Find Median from Data Stream Hard Two Heaps (Max/Min) Classic design problem using two heaps to maintain median in a streaming fashion. LC Top, Blind 75
58 Merge k Sorted Lists Hard Heap (Priority Queue) (Re-listed) Efficiently merging multiple lists using a min-heap. LC Top, Blind 75
59 Task Scheduler Medium Greedy, Heap, Hashing Scheduling tasks with cooldowns. Often solved greedily or with a max-heap. LC Top, NeetCode

πŸ”™ Backtracking

# Problem Difficulty Concepts Why MAANG+ Loves It Source Hint*
60 ⭐ Subsets Medium Backtracking, Recursion Generating all possible combinations (powerset). Foundational backtracking. LC Top, Blind 75
61 Combination Sum Medium Backtracking, Recursion Finding combinations that sum to a target (with repetition allowed). LC Top, Blind 75
62 Permutations Medium Backtracking, Recursion Generating all orderings of elements. LC Top, Blind 75
63 Subsets II Medium Backtracking, Sorting Subsets problem with duplicate elements. Requires handling duplicates carefully. LC Top, NeetCode
64 Combination Sum II Medium Backtracking, Sorting Combination sum with duplicates, ensuring unique combinations. LC Top, NeetCode
65 ⭐ Word Search Medium Backtracking, DFS Classic grid backtracking problem. Searching for a word in a 2D board. LC Top, Blind 75
66 Letter Combinations of a Phone Number Medium Backtracking, Recursion Mapping digits to letters and generating combinations. Common recursive structure. LC Top, NeetCode
67 N-Queens Hard Backtracking Quintessential constraint satisfaction backtracking problem. LC Top
68 Palindrome Partitioning Medium Backtracking, DP Partitioning a string into palindromic substrings. LC Top, NeetCode

πŸ’» Dynamic Programming (1D)

# Problem Difficulty Concepts Why MAANG+ Loves It Source Hint*
69 ⭐ Climbing Stairs Easy DP (Fibonacci) The introductory DP problem, equivalent to Fibonacci sequence. LC Top, Blind 75
70 ⭐ Coin Change Medium DP (Unbounded Knapsack) Classic DP problem for minimum coins. Tests state definition and transitions. LC Top, Blind 75
71 ⭐ Longest Increasing Subsequence Medium DP, Binary Search Fundamental subsequence problem. Can be optimized with Binary Search (patience sorting). LC Top, Blind 75
72 ⭐ Word Break Medium DP, String Checking if a string can be segmented using a dictionary. Common string DP. LC Top, Blind 75
73 ⭐ House Robber Medium DP Simple 1D DP with non-adjacent constraint. LC Top, Blind 75
74 House Robber II Medium DP Variation of House Robber with circular arrangement. Tests reducing to subproblems. LC Top, Blind 75
75 Decode Ways Medium DP, String Counting ways to decode a numeric string. Tests handling DP states carefully. LC Top, Blind 75
76 Maximum Product Subarray Medium DP (Re-listed) Requires tracking both max and min product ending at index i. LC Top, Blind 75
77 Partition Equal Subset Sum Medium DP (0/1 Knapsack) Subset sum variation. Tests boolean DP state. LC Top, NeetCode

🧱 Dynamic Programming (2D & Advanced)

# Problem Difficulty Concepts Why MAANG+ Loves It Source Hint*
78 Unique Paths Medium DP (Grid) Basic 2D DP on a grid. Calculating paths from top-left to bottom-right. LC Top, Blind 75
79 Longest Common Subsequence Medium DP (2D String) Fundamental DP problem for comparing two sequences. LC Top, Blind 75
80 Edit Distance Medium DP (2D String) Classic DP for string transformation distance (Levenshtein). LC Top, NeetCode
81 Best Time to Buy and Sell Stock with Cooldown Medium DP (State Machine) Stock problem variation requiring state machine DP (buy, sell, cooldown). LC Top, NeetCode
82 Regular Expression Matching Hard DP, Recursion Complex DP involving matching patterns with '.' and '*'. Tests careful state transitions. LC Top
83 Burst Balloons Hard DP (Interval) Challenging interval DP. Requires thinking about the last operation. LC Top, NeetCode
84 Maximal Square Medium DP (Grid) Finding the largest square of 1s in a binary matrix. Common 2D DP pattern. LC Top

🌐 Graph (BFS/DFS/Union-Find)

# Problem Difficulty Concepts Why MAANG+ Loves It Source Hint*
85 ⭐ Number of Islands Medium BFS/DFS, Grid The fundamental graph traversal problem on a grid. Counts connected components. LC Top, Blind 75
86 ⭐ Clone Graph Medium BFS/DFS, Hashing Deep copying graph structure. Tests handling visited nodes and recursion/iteration. LC Top, Blind 75
87 Pacific Atlantic Water Flow Medium BFS/DFS, Grid Multi-source traversal from oceans inward. Tests simultaneous graph traversals. LC Top, Blind 75
88 ⭐ Course Schedule Medium Topological Sort (DFS/BFS) Detecting cycles in a directed graph (prerequisite check). Essential pattern. LC Top, Blind 75
89 Course Schedule II Medium Topological Sort Finding a valid course order (if one exists). Extends Course Schedule I. LC Top, NeetCode
90 Number of Connected Components in an Undirected Graph (Premium) Medium Union-Find, BFS/DFS Basic connectivity check, solvable efficiently with Union-Find. Blind 75, NeetCode
91 Graph Valid Tree (Premium) Medium Union-Find, BFS/DFS Checking if a graph is a tree (connected and acyclic). Combines concepts. Blind 75, NeetCode
92 Redundant Connection Medium Union-Find Finding the edge that creates a cycle in an undirected graph. Classic Union-Find. NeetCode

πŸ—ΊοΈ Graph (Advanced & Shortest Path)

# Problem Difficulty Concepts Why MAANG+ Loves It Source Hint*
93 ⭐ Word Ladder Hard BFS, Implicit Graph Shortest path on an implicit graph where nodes are words and edges are transformations. LC Top, Blind 75
94 Network Delay Time Medium Dijkstra's/Bellman-Ford, BFS Shortest path from a source in a weighted directed graph (non-negative weights). LC Top, NeetCode
95 Cheapest Flights Within K Stops Medium Bellman-Ford / Modified Dijkstra Shortest path with constraint on number of edges. Tests modified algorithms. NeetCode
96 Alien Dictionary (Premium) Hard Topological Sort, Graph Building Deriving character order from a sorted list of words. Complex graph construction. Blind 75, NeetCode
97 Critical Connections in a Network Hard Tarjan's Algorithm (Bridges) Finding bridges in a graph. Tests understanding of advanced graph algorithms. NeetCode

πŸ” Binary Search

(Problems like Find Minimum in Rotated Sorted Array, Search in Rotated Sorted Array are already listed)

# Problem Difficulty Concepts Why MAANG+ Loves It Source Hint*
98 ⭐ Binary Search Easy Binary Search The core algorithm itself. Essential foundation. LC Top
99 Search a 2D Matrix Medium Binary Search Applying binary search on a conceptually flattened sorted 2D matrix. LC Top, Blind 75
100 Time Based Key-Value Store Medium Hashing, Binary Search Searching for a value based on timestamp. Requires binary search on timestamps. LC Top, Blind 75
101 ⭐ Median of Two Sorted Arrays Hard Binary Search Advanced binary search on partitions to find the median efficiently. LC Top, Blind 75
102 Koko Eating Bananas Medium Binary Search on Answer Searching for the minimum speed (the answer) within a possible range. NeetCode

πŸ’‘ Greedy

# Problem Difficulty Concepts Why MAANG+ Loves It Source Hint*
103 ⭐ Maximum Subarray Medium Greedy (Kadane's) (Re-listed) Can be solved optimally with a simple greedy approach (Kadane's). LC Top, Blind 75
104 Jump Game Medium Greedy Checking reachability by tracking the maximum reachable index greedily. LC Top, Blind 75
105 Jump Game II Medium Greedy, BFS Finding the minimum jumps. Can be solved greedily or viewed as a BFS level order. LC Top, NeetCode
106 Gas Station Medium Greedy Classic greedy problem proving existence and finding a valid starting point. LC Top, NeetCode
107 Hand of Straights Medium Greedy, Hashing Forming consecutive groups greedily using counts. NeetCode
108 Merge Triplets to Form Target Triplet Medium Greedy Simple greedy check if the target triplet can be formed by valid merges. NeetCode
109 Partition Labels Medium Greedy, Two Pointers Finding the smallest partitions such that each letter appears in at most one part. LC Top, NeetCode

πŸ“ Math & Bit Manipulation

# Problem Difficulty Concepts Why MAANG+ Loves It Source Hint*
110 Number of 1 Bits Easy Bit Manipulation Basic bit counting (Hamming weight). LC Top, Blind 75
111 Counting Bits Easy Bit Manipulation, DP Calculating bits for numbers 0 to n efficiently, often using DP relation. LC Top, Blind 75
112 Reverse Bits Easy Bit Manipulation Reversing the bits of an integer. Tests careful bit shifting and masking. LC Top, Blind 75
113 Missing Number Easy Bit Manipulation (XOR), Math Finding the missing number in a range using XOR properties or sum formula. LC Top, Blind 75
114 ⭐ Sum of Two Integers Medium Bit Manipulation Adding numbers without using + or -. Tests understanding of bitwise addition. LC Top, Blind 75
115 Reverse Integer Medium Math, Overflow Check Reversing digits of an integer while handling potential overflow. LC Top
116 Pow(x, n) Medium Recursion, Math Efficient exponentiation using recursion (exponentiation by squaring). LC Top
117 Rotate Image Medium Math, Matrix Rotating a matrix in-place. Tests index manipulation and layer-by-layer approach. LC Top, NeetCode
118 Spiral Matrix Medium Matrix Traversal Traversing a matrix in a spiral pattern. Tests boundary and direction handling. LC Top, NeetCode
119 Set Matrix Zeroes Medium Matrix, Space Optimization Setting rows/columns to zero efficiently, often using O(1) extra space. LC Top, NeetCode

🧩 Intervals

# Problem Difficulty Concepts Why MAANG+ Loves It Source Hint*
120 ⭐ Insert Interval Medium Interval Merging Inserting a new interval into sorted, non-overlapping intervals and merging. LC Top, Blind 75
121 ⭐ Merge Intervals Medium Sorting, Intervals The canonical interval merging problem after sorting by start time. LC Top, Blind 75
122 ⭐ Non-overlapping Intervals Medium Greedy, Sorting Finding minimum removals to make intervals non-overlapping. Classic greedy choice. LC Top, Blind 75
123 Meeting Rooms (Premium) Easy Sorting, Intervals Checking if a person can attend all meetings (no overlaps). Basic interval check. Blind 75, NeetCode
124 ⭐ Meeting Rooms II (Premium) Medium Heap, Sorting Finding the minimum number of rooms required. Tests heap or sweep-line logic. Blind 75, NeetCode
125 Minimum Interval to Include Each Query Hard Heap, Sorting, Sweep Line Advanced interval problem requiring efficient querying using heaps and sorting. NeetCode

πŸš€ Final Thoughts & Next Steps

This list covers a broad spectrum of DSA patterns essential for MAANG+ interviews.

  1. Understand the Core Concept: Don't just memorize solutions. Understand why a particular approach works (e.g., why use a heap for Kth largest? Why is Kadane's greedy?).
  2. Practice Variations: Once you solve a problem, think about variations (e.g., different constraints, follow-up questions).
  3. Time Yourself: Simulate interview conditions. Can you solve medium problems within 20-30 minutes?
  4. Explain Your Thought Process: Practice articulating your solution clearly, step-by-step. This is crucial in interviews.
  5. Review Regularly: Spaced repetition helps solidify concepts.

Good luck with your preparation! You've got this! 🌟


πŸ’¬ Contributing

Found an issue? Think a critical problem is missing? We welcome Pull Requests and Issues! Please check our (optional) CONTRIBUTING.md guide for details. Let's make this the best resource for everyone!


πŸ™Œ Support

If this repository helps you, please give it a ⭐! Share it with fellow engineers preparing for interviews.

LinkedIn Badge Website Badge

About

Ace your MAANG+ interviews with this curated list of 100 essential DSA problems. From arrays to graphs, master every concept with detailed solutions and expert tips. Start your path to a top-tier tech job today!

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks