Top 50 LeetCode Problems Organized by Pattern
12 min read
LeetCode has thousands of problems, but a core set of 50 covers the patterns you will see in most coding interviews. This list groups them by the 7 pattern categories used in AlgoArk, so you can study by pattern instead of by random problem number.
How to Use This List
Pick one category, learn the pattern (use our pattern pages), then solve 3–5 problems from that category before moving on. Do not jump between categories. Master one pattern at a time.
Array & String
| Problem | # | Difficulty | Pattern |
|---|---|---|---|
| Two Sum | 1 | Easy | Two Pointers / Hash Map |
| 3Sum | 15 | Medium | Two Pointers |
| Container With Most Water | 11 | Medium | Two Pointers |
| Valid Palindrome | 125 | Easy | Two Pointers |
| Longest Substring Without Repeating Characters | 3 | Medium | Sliding Window |
| Minimum Window Substring | 76 | Hard | Sliding Window |
| Subarray Sum Equals K | 560 | Medium | Prefix Sum |
| Maximum Subarray | 53 | Medium | Kadane's |
| Product of Array Except Self | 238 | Medium | Prefix Sum |
Hashing & Frequency
| Problem | # | Difficulty | Pattern |
|---|---|---|---|
| Group Anagrams | 49 | Medium | Hash Map |
| Top K Frequent Elements | 347 | Medium | Top K / Hash Map |
| Valid Anagram | 242 | Easy | Hash Map |
| Contains Duplicate | 217 | Easy | Hash Map |
| Two Sum | 1 | Easy | Two Sum Pattern |
| 3Sum | 15 | Medium | Two Sum Variant |
Sorting & Searching
| Problem | # | Difficulty | Pattern |
|---|---|---|---|
| Binary Search | 704 | Easy | Binary Search |
| Search Insert Position | 35 | Easy | Binary Search |
| Find Minimum in Rotated Sorted Array | 153 | Medium | Binary Search |
| Merge Intervals | 56 | Medium | Merge Intervals |
| Insert Interval | 57 | Medium | Merge Intervals |
| K Closest Points to Origin | 973 | Medium | Top K |
| Find Kth Largest Element | 215 | Medium | Top K / QuickSelect |
Tree & Graph
| Problem | # | Difficulty | Pattern |
|---|---|---|---|
| Binary Tree Level Order Traversal | 102 | Medium | BFS |
| Number of Islands | 200 | Medium | BFS / DFS |
| Maximum Depth of Binary Tree | 104 | Easy | DFS |
| Validate Binary Search Tree | 98 | Medium | DFS |
| Lowest Common Ancestor of BST | 235 | Easy | DFS |
| Combination Sum | 39 | Medium | Backtracking |
| Course Schedule | 207 | Medium | Topological Sort |
| Clone Graph | 133 | Medium | BFS / DFS |
Dynamic Programming
| Problem | # | Difficulty | Pattern |
|---|---|---|---|
| Climbing Stairs | 70 | Easy | Fibonacci |
| House Robber | 198 | Medium | Fibonacci |
| Coin Change | 322 | Medium | Unbounded Knapsack |
| Partition Equal Subset Sum | 416 | Medium | 0/1 Knapsack |
| Longest Common Subsequence | 1143 | Medium | LCS |
| Edit Distance | 72 | Hard | LCS |
| Binary Tree Maximum Path Sum | 124 | Hard | DP on Trees |
| Unique Paths | 62 | Medium | Grid DP |
| Minimum Path Sum | 64 | Medium | Grid DP |
Linked List
| Problem | # | Difficulty | Pattern |
|---|---|---|---|
| Reverse Linked List | 206 | Easy | Reversal |
| Merge Two Sorted Lists | 21 | Easy | Merge |
| Linked List Cycle | 141 | Easy | Fast-Slow Pointers |
| Reorder List | 143 | Medium | Fast-Slow + Reversal |
Advanced
| Problem | # | Difficulty | Pattern |
|---|---|---|---|
| Implement Trie | 208 | Medium | Trie |
| Design Add and Search Words | 211 | Medium | Trie |
| LRU Cache | 146 | Medium | Hash Map + Linked List |
| Merge K Sorted Lists | 23 | Hard | K-Way Merge |
| Find Median from Data Stream | 295 | Hard | Two Heaps |
| Number of Connected Components | 323 | Medium | Union Find |
Recommended Study Order
- Array & String — Two Pointers, Sliding Window, Prefix Sum. These appear constantly.
- Hashing & Frequency — Hash maps and Two Sum variants. Quick wins.
- Tree & Graph — BFS, DFS, Backtracking. Core traversal patterns.
- Sorting & Searching — Binary Search, Merge Intervals, Top K.
- Dynamic Programming — Start with Fibonacci, then Knapsack, then LCS.
- Linked List — Reversal, Fast-Slow Pointers.
- Advanced — Trie, Union Find, Two Heaps. Save for later.
Related reads:
Not sure which pattern fits?
Use our decision tree to identify the pattern for any problem.
Try the Decision Tree