| Sorted array, find pair/triplet | Two pointers |
| Contiguous subarray/substring with a condition | Sliding window (variable) / prefix sum + hashmap |
| Subarray sum = K (negatives allowed) | Prefix sum + hashmap |
| ”Next greater/smaller”, histogram, stock span | Monotonic stack |
| Sliding-window max/min | Monotonic deque |
| Sorted / monotonic answer space, “minimize the max” | Binary search (on the answer) |
| Top/Kth largest, merge K sorted, streaming median | Heap(s) |
| All combinations/permutations/subsets | Backtracking |
| Shortest path, unweighted | BFS |
| Shortest path, weighted non-negative | Dijkstra |
| Negative weights | Bellman-Ford |
| Dependencies / ordering | Topological sort |
| Connectivity, grouping, cycle in undirected graph | Union-Find (DSU) |
| Prefix/word lookup, autocomplete | Trie |
| Overlapping intervals | Sort by start + merge / sweep line / min-heap of ends |
| Optimal value over choices with overlapping subproblems | DP (define state → transition → base → order) |
| “Count ways” | DP / combinatorics |
| Range queries with updates | Segment tree / Fenwick tree |
| Linked list cycle / middle | Fast & slow pointers |
| XOR tricks, subsets as masks | Bit manipulation |
| LRU/LFU, design a data structure | HashMap + doubly linked list / multiple maps |