Master the 12 essential patterns that appear in most coding interviews. Learn the pattern once, solve hundreds of problems.
Traverse arrays efficiently with two indices
Solve subarray/substring problems in O(n)
Divide and conquer for O(log n) search
LIFO for brackets, monotonic problems
Pointer manipulation and cycle detection
DFS and BFS for binary trees
BFS/DFS for graphs and grids
Generate subsets, permutations, combinations
Top-K and streaming problems
Solve overlapping subproblems optimally
Locally optimal choices for global optimum
Merge, insert, and schedule intervals