PROBLEMS/ARRAYS & HASHING
Arrays & Hashing LeetCode Problems
1013 hand-tagged Arrays & Hashing problems across 7 interview patterns (Frequency Counting / Hash Map Lookup, Hash-Backed Design, Prefix Sums, Kadane's Algorithm (Max Subarray), Sorting + Comparison, Complement Search (Two Sum Pattern), Matrix Traversal (Diagonal, Valid Sudoku, etc)), ranked by importance (how often each pattern shows up in real coding interviews). Work top-down within each pattern.
| # | PROBLEM | DIFF | ELO | IMP | PATTERNS |
|---|---|---|---|---|---|
| 1 | Longest Consecutive Sequence | Medium | 1412 | 91 | Union-Find |
| 2 | Group Anagrams | Easy | 1219 | 90 | Sorting + Comparison |
| 3 | Contains Duplicate | Easy | 978 | 82 | |
| 4 | Valid Anagram | Easy | 1025 | 82 | Sorting + Comparison |
| 5 | Majority Element | Easy | 1052 | 82 |
| # | PROBLEM | DIFF | ELO | IMP | PATTERNS |
|---|---|---|---|---|---|
| 1 | LRU Cache | Medium | 1580 | 93 | Merge Linked Lists |
| 2 | Insert Delete GetRandom O(1) | Medium | 1502 | 78 | General Math |
| 3 | LFU Cache | Hard | 2028 | 78 | Reversal (Full and Partial) |
| 4 | Detect Squares | Hard | 1841 | 72 | General Math |
| 5 | Design HashMap | Easy | 1038 | 69 |
| # | PROBLEM | DIFF | ELO | IMP | PATTERNS |
|---|---|---|---|---|---|
| 1 | Product of Array Except Self | Easy | 1305 | 91 | |
| 2 | Subarray Sum Equals K | Easy | 1324 | 91 | Frequency Counting / Hash Map Lookup |
| 3 | Range Sum Query - Immutable | Easy | 1028 | 90 | |
| 4 | Range Sum Query 2D - Immutable | Medium | 1407 | 87 | Matrix Traversal (Diagonal, Valid Sudoku, etc) |
| 5 | Range AdditionPREMIUM | Easy | 1371 | 82 |
| # | PROBLEM | DIFF | ELO | IMP | PATTERNS |
|---|---|---|---|---|---|
| 1 | Maximum Subarray | Easy | 1200 | 93 | Linear Recurrence DP |
| 2 | Best Time to Buy and Sell Stock | Easy | 1053 | 92 | Linear Recurrence DP |
| 3 | Maximum Sum Circular Subarray | Medium | 1777 | 79 | Prefix Sums |
| 4 | Find the Substring With Maximum Cost | Medium | 1422 | 68 | Frequency Counting / Hash Map Lookup |
| 5 | Maximum Score Of Spliced Array | Medium | 1791 | 62 | Linear Recurrence DP · Prefix Sums |
| # | PROBLEM | DIFF | ELO | IMP | PATTERNS |
|---|---|---|---|---|---|
| 1 | Sort an Array | Medium | 1480 | 76 | |
| 2 | Next Permutation | Medium | 1533 | 68 | Opposite-Direction (Converging) |
| 3 | Divide Players Into Teams of Equal Skill | Easy | 1323 | 63 | Opposite-Direction (Converging) · Complement Search (Two Sum Pattern) |
| 4 | Make Lexicographically Smallest Array by Swapping Elements | Hard | 2047 | 63 | Union-Find · Sorting-Based Greedy |
| 5 | Number of Pairs Satisfying Inequality | Hard | 2030 | 62 | Binary Search on Answer Space · Prefix Sums |
| # | PROBLEM | DIFF | ELO | IMP | PATTERNS |
|---|---|---|---|---|---|
| 1 | Two Sum | Easy | 1142 | 95 | Frequency Counting / Hash Map Lookup |
| 2 | Max Number of K-Sum Pairs | Easy | 1346 | 78 | Opposite-Direction (Converging) · Frequency Counting / Hash Map Lookup |
| 3 | 4Sum II | Easy | 1372 | 72 | Frequency Counting / Hash Map Lookup |
| 4 | Count Pairs That Form a Complete Day II | Easy | 1385 | 68 | Frequency Counting / Hash Map Lookup · Modular Arithmetic |
| 5 | Pairs of Songs With Total Durations Divisible by 60 | Easy | 1377 | 62 | Modular Arithmetic |
| # | PROBLEM | DIFF | ELO | IMP | PATTERNS |
|---|---|---|---|---|---|
| 1 | Valid Sudoku | Easy | 1267 | 76 | Frequency Counting / Hash Map Lookup |
| 2 | Spiral Matrix | Medium | 1418 | 76 | |
| 3 | Set Matrix Zeroes | Easy | 1378 | 74 | Frequency Counting / Hash Map Lookup |
| 4 | Island Perimeter | Easy | 1076 | 68 | |
| 5 | Game of Life | Easy | 1388 | 52 | General Bit Manipulation |
EVERY PATTERN
// your mastery





What's your Arrays & Hashing tier?
leaps.gg syncs your LeetCode history and scores your mastery of every pattern, then recommends the exact problems to do next with spaced repetition. Free to start.
GET MY MASTERY MAP →