How to use this roadmap
- Go through topics top to bottom on your first pass — later topics (graphs, DP) lean on patterns from earlier ones (traversal, recursion, two pointers).
- Read the theory for a subtopic before touching its problems. The goal is pattern recognition, not memorized solutions.
- Respect the time box on each problem. If you're stuck past the allotted time, read the editorial/solution, understand it fully, and move on — revisit it later.
- This is a senior-level bar: depth and the ability to explain trade-offs matter more than raw problem count. Quality of understanding beats quantity grinded.
- Note on 2026 interview loops: several FAANG companies have added AI-assisted coding rounds and shifted senior loops toward system design and judgement. That makes rock solid DSA fundamentals a baseline expectation, not the whole story — but you still cannot pass without them.
The Roadmap
- 1
The vocabulary and process you'll reuse in every single topic that follows.
- 2
The substrate everything else is built on: linear scans, prefix precomputation, O(1) lookups via hashing, and what's actually happening inside that hash table.
- 3
Two indices, one pass: the pattern that turns quadratic pair-and-position problems into linear ones.
- 4
Turn O(n²) brute-force scans over every subarray or substring into a single O(n) pass by reusing work between neighboring windows.
- 5
The LIFO discipline that turns nested structures, backtracking parentheses, and 'next greater element' scans into linear-time one-pass algorithms.
- 6
The highest-leverage O(log n) trick in the entire roadmap — trivial to describe, notoriously easy to get wrong at the boundaries.
- 7
The primitive everything else quietly depends on — from Heaps' quickselect to Intervals' sweep line.
- 8
Master pointer manipulation — the discipline where losing a single reference silently corrupts your entire data structure.
- 9
Compose two or three simple structures to satisfy several O(1)/O(log n) requirements at once -- the same instinct behind LRU/LFU cache, applied to streaming windows.
- 10
The first genuinely recursive data structure on this roadmap — and the training ground for the recursive thinking you'll reuse in Backtracking, Graphs, and DP on Trees.
- 11
A tree shaped by shared prefixes, turning prefix-based string queries into O(L) walks instead of O(n) scans.
- 12
Turn "give me the current min or max, fast" into a reflex, and learn to recognize the three heap shapes — top-K, two-heaps, and k-way merge — that cover most FAANG heap questions.
- 13
Exhaustive search done right: build a candidate one choice at a time, undo cleanly, and prune hard.
- 14
The roadmap's biggest topic: one model — vertices and edges — that unifies traversal, invented state spaces, ordering, connectivity, and shortest paths into a single interview-ready toolkit.
- 15
The topic that decides more FAANG interview outcomes than any other — not because it's obscure, but because deriving a recurrence under pressure is a fundamentally different skill than recognizing a pattern.
- 16
Make the locally best choice and never look back — but only after you can prove it can't lose.
- 17
Sort, then sweep: one template collapses merging, scheduling, and max-overlap problems into a single linear scan.
- 18
A small set of XOR, mask, and shift identities that turn O(n)-space hash-set solutions into true O(1)-space, single-pass tricks.
- 18.1Bit Manipulation
- 19
The low-frequency, high-annoyance-when-you-flub-it topic: number theory, matrix manipulation, and geometry, all trimmed to what interviewers actually ask.
- 20
Palindromic substrings via expand-around-center — the one "advanced strings" technique that's a genuine, frequent Senior+ FAANG staple rather than a from-scratch-algorithm party trick.
- 21
Optional — real algorithms that are genuinely rare in Senior+ FAANG coding rounds. Skip this whole topic with zero risk unless your target loop is known to be algorithm-heavy (Google, competitive-programming-adjacent teams, some quant/HFT shops).
- 21.1Skip Lists & Ordered Structures
- 21.2Fenwick Trees & Segment Trees (Range Queries with Updates)
- 21.3Recursive Descent Parsing & Heuristic Search
- 21.4Minimum Spanning Tree (Prim's & Kruskal's)
- 21.5Interval DP
- 21.6Huffman Coding & Optimal Caching
- 21.7Closest Pair & Convex Hull
- 21.8String Matching (KMP, Rabin-Karp, Z-Function)
- 21.9Manacher's Algorithm
Questions Bank
Once you've been through the roadmap above, the topic grouping itself becomes a hint you won't have in a real interview. This is 505 Senior-FAANG-relevant problems in one fixed random order — title and LeetCode difficulty only, nothing else — for practicing cold pattern recognition.
Questions Bank505 Medium/Hard problems, randomly ordered, no topic or difficulty hints beyond what LeetCode itself shows.