How to Use This List
This is not a random collection of LeetCode problem numbers. Every problem here was chosen because it teaches a pattern that repeats across dozens of interview questions. Once you recognise the pattern, solving new problems becomes fast.
For each problem: solve it once from scratch, then solve it again two days later without looking at your solution. If you cannot, you don't own the pattern yet. Time complexity targets are listed — knowing why a solution is O(n log n) is as important as knowing how to write it.
Arrays & Strings — 10 Problems
Pattern to master: Two pointers, sliding window, prefix sums, hash maps for O(1) lookups.
| # | Problem | Difficulty | Key Pattern |
|---|---|---|---|
| 1 | Two Sum | Easy | Hash map |
| 2 | Best Time to Buy and Sell Stock | Easy | Single pass, min tracker |
| 3 | Longest Substring Without Repeating Characters | Medium | Sliding window |
| 4 | Container With Most Water | Medium | Two pointers |
| 5 | 3Sum | Medium | Sort + two pointers |
| 6 | Product of Array Except Self | Medium | Prefix & suffix products |
| 7 | Maximum Subarray (Kadane's) | Medium | DP / greedy |
| 8 | Minimum Window Substring | Hard | Sliding window + frequency map |
| 9 | Longest Palindromic Substring | Medium | Expand around centre |
| 10 | Trapping Rain Water | Hard | Two pointers / prefix max |
Linked Lists — 5 Problems
Pattern to master: Fast & slow pointers (Floyd's cycle), dummy nodes, reverse in place.
| # | Problem | Difficulty | Key Pattern |
|---|---|---|---|
| 11 | Reverse Linked List | Easy | Iterative pointer reversal |
| 12 | Detect Cycle in Linked List | Easy | Fast & slow pointers |
| 13 | Merge Two Sorted Lists | Easy | Dummy head, merge |
| 14 | LRU Cache | Medium | Doubly linked list + hash map |
| 15 | Reorder List | Medium | Find mid + reverse + merge |
Trees & BST — 8 Problems
Pattern to master: DFS (pre/in/post order), BFS level order, recursive decomposition.
| # | Problem | Difficulty | Key Pattern |
|---|---|---|---|
| 16 | Maximum Depth of Binary Tree | Easy | DFS recursion |
| 17 | Invert Binary Tree | Easy | DFS recursion |
| 18 | Binary Tree Level Order Traversal | Medium | BFS with queue |
| 19 | Validate Binary Search Tree | Medium | Inorder / bounds passing |
| 20 | Lowest Common Ancestor of BST | Medium | BST property traversal |
| 21 | Binary Tree Maximum Path Sum | Hard | Post-order, global max |
| 22 | Construct Binary Tree from Preorder & Inorder | Medium | Recursive rebuild + hash |
| 23 | Serialize and Deserialize Binary Tree | Hard | BFS / DFS + string encoding |
Graphs — 7 Problems
Pattern to master: BFS/DFS on adjacency list, Union-Find, topological sort, Dijkstra.
| # | Problem | Difficulty | Key Pattern |
|---|---|---|---|
| 24 | Number of Islands | Medium | BFS/DFS flood fill |
| 25 | Clone Graph | Medium | BFS + hash map |
| 26 | Course Schedule (Cycle detection) | Medium | Topological sort / DFS |
| 27 | Pacific Atlantic Water Flow | Medium | Multi-source BFS |
| 28 | Longest Consecutive Sequence | Medium | Hash set O(n) |
| 29 | Word Ladder | Hard | BFS shortest path |
| 30 | Alien Dictionary | Hard | Topological sort |
Dynamic Programming — 10 Problems
Pattern to master: Define state, write recurrence, memoize or tabulate. Always draw the DP table first.
| # | Problem | Difficulty | Key Pattern |
|---|---|---|---|
| 31 | Climbing Stairs | Easy | Fibonacci DP |
| 32 | Coin Change | Medium | Unbounded knapsack |
| 33 | Longest Increasing Subsequence | Medium | DP O(n²) / patience sort O(n log n) |
| 34 | Word Break | Medium | 1D DP + set lookup |
| 35 | House Robber | Medium | 1D DP, skip adjacent |
| 36 | Unique Paths | Medium | 2D grid DP |
| 37 | Longest Common Subsequence | Medium | 2D DP |
| 38 | Edit Distance | Hard | 2D DP |
| 39 | Burst Balloons | Hard | Interval DP |
| 40 | Regular Expression Matching | Hard | 2D DP with backtracking |
Stack & Queue — 5 Problems
| # | Problem | Difficulty | Key Pattern |
|---|---|---|---|
| 41 | Valid Parentheses | Easy | Stack matching |
| 42 | Min Stack | Medium | Auxiliary min stack |
| 43 | Daily Temperatures | Medium | Monotonic stack |
| 44 | Largest Rectangle in Histogram | Hard | Monotonic stack |
| 45 | Sliding Window Maximum | Hard | Monotonic deque |
Heaps & Sorting — 5 Problems
| # | Problem | Difficulty | Key Pattern |
|---|---|---|---|
| 46 | Kth Largest Element in Array | Medium | Min-heap of size k |
| 47 | Top K Frequent Elements | Medium | Heap / bucket sort |
| 48 | Find Median from Data Stream | Hard | Two heaps (min + max) |
| 49 | Merge K Sorted Lists | Hard | Min-heap / divide & conquer |
| 50 | Meeting Rooms II | Medium | Sort + min-heap for end times |
Suggested 8-Week Study Plan
- Week 1–2: Arrays, Strings, Linked Lists (problems 1–15)
- Week 3–4: Trees and Graphs (problems 16–30)
- Week 5–6: Dynamic Programming (problems 31–40)
- Week 7: Stacks, Queues, Heaps (problems 41–50)
- Week 8: Timed mock problems + review weak spots