LeetCode Templates
LeetCode Templates
Master index and category collections of solution patterns and Meta practice lists
Recent posts by category
Spring 2026 writeups mapped to common themes (see also LeetCode Questions List → Problems by Category).
- Trees / enumeration: LC 894
- Hash map / grouping: LC 2342
- Greedy / scheduling: LC 2365
- Geometry: LC 223
- Sliding window: LC 2461
- Linked list / sampling: LC 382
- Prefix sum: LC 2270
- Matrix in-place: LC 73
- XOR / prefix: LC 2433
- Graph / tree validity: LC 261
- String greedy: LC 1328
- Binary search on answer: LC 1870
- Bit tricks: LC 260
Arrays & Strings
Sliding Window, Two Pointers, Binary Search, Prefix Sum, Hash Map, KMP, Manacher, Z-Algorithm, Rolling Hash
Data Structures
Monotonic Stack/Queue, Heap, Union-Find, Trie, Segment Tree, Fenwick Tree, Bitwise Trie
Graph
BFS, Multi-source BFS, Bitmask BFS, Topological Sort, Dijkstra, 0-1 BFS, Tarjan/Bridges
Trees
Traversals, LCA (binary lifting), HLD skeleton
Dynamic Programming
1D/Knapsack, 2D/Grid, Digit DP, Bitmask DP
Math & Geometry
nCk mod P, factorials, geometry primitives and cross products
Advanced Techniques
Coordinate Compression, Meet-in-the-Middle, Manacher, Z-Algorithm, Bitwise Trie