Coding Interview Patterns
21 patterns · 206 curated problems
13M 2H
Sliding Window
- Finding max/min subarray of size k
- Longest substring without repeating characters
15 problems
Study pattern
5E 7M 1H
Two Pointers
- Pair sum in sorted array
- Removing duplicates in-place
13 problems
Study pattern
1E 7M 2H
Binary Search
- Searching in sorted array
- Finding first/last occurrence
10 problems
Study pattern
3E 4M
Prefix Sum
- Range sum queries
- Subarray sum equals k
7 problems
Study pattern
6E 6M
Hash Map / Set
- Two sum (find complement)
- Anagram grouping
12 problems
Study pattern
1E 9M
Stack
- Valid parentheses / bracket matching
- Next greater element
10 problems
Study pattern
9M 1H
Queue / BFS
- Shortest path in unweighted graph
- Level-order tree traversal
10 problems
Study pattern
7M 2H
Heap / Priority Queue
- Kth largest/smallest element
- Merge k sorted lists
9 problems
Study pattern
4E 6M 1H
Linked List
- Detecting cycles (Floyd's algorithm)
- Reversing a linked list
11 problems
Study pattern
4E 10M 2H
Trees / DFS
- Tree height/depth
- Path sum problems
16 problems
Study pattern
9M
Graphs
- Number of islands
- Clone graph
9 problems
Study pattern
3E 21M 2H
Dynamic Programming
- Fibonacci and climbing stairs
- Knapsack variants
26 problems
Study pattern
7M 1H
Greedy
- Jump game
- Gas station
8 problems
Study pattern
9M 1H
Backtracking
- Generate all permutations/combinations/subsets
- N-Queens
10 problems
Study pattern
4M 1H
Trie
- Implement Trie (insert/search/startsWith)
- Word search II
5 problems
Study pattern
5M 1H
Union Find
- Number of connected components
- Redundant connection (cycle detection)
6 problems
Study pattern
1E 4M 1H
Monotonic Stack
- Largest rectangle in histogram
- Trapping rain water
6 problems
Study pattern
4M
Topological Sort
- Course Schedule (detect cycle)
- Course Schedule II (ordering)
4 problems
Study pattern
6E 2M
Bit Manipulation
- Single number (XOR trick)
- Number of 1 bits (Hamming weight)
8 problems
Study pattern
1E 2M 1H
Intervals
- Merge intervals
- Insert interval
4 problems
Study pattern
1E 6M
Matrix
- Rotate image 90°
- Spiral matrix traversal
7 problems
Study pattern