$ ls patterns/
// every interview problem is one of ~20 patterns wearing a costume
arrays-hashing.mdThe bread and butter — arrays, strings, hashmaps, frequency counting, prefix sums.
9 problemstwo-pointers.mdOpposing or same-direction pointers turn O(n²) pair-search into O(n).
5 problemssliding-window.mdExpand-shrink template for longest/shortest substring or subarray with property.
6 problemsstack.mdLIFO + monotonic stack — next greater/smaller, parsing, histogram problems.
7 problemsbinary-search.mdHalve search space. Master one template — including search-on-answer.
7 problemslinked-list.mdDummy head, fast/slow pointers, reversal, in-place rearrangement, LRU.
11 problemstrees.mdRecursion + traversals. BST, BFS, postorder reductions, local+global tracking.
15 problemstries.mdPrefix tree for autocomplete, dictionary, word-search-on-grid problems.
3 problemsheaps.mdTop K, two heaps for medians, k-way merge, scheduling.
7 problemsbacktracking.mdRecursion with undo. Subsets, permutations, combinations, N-Queens.
8 problemsgraphs.mdBFS, DFS, islands, topological sort, cycle detection.
10 problemsadvanced-graphs.mdDijkstra, Bellman-Ford, Union-Find, MST.
9 problemsdp-1d.mdFibonacci-style, House Robber, Coin Change, LIS, Word Break.
13 problemsdp-2d.mdGrid DP, knapsack, LCS, edit distance, interval DP.
7 problemsgreedy-intervals.mdLocal-optimal proofs, jump game, interval scheduling/merging.
7 problemsbit-manipulation.mdXOR tricks, bitmask DP, popcount, common idioms.
5 problems