12 topics in optimal learning order. Each topic has patterns, must-do problems with company tags, and key concepts.
Arrays are the most fundamental data structure. Master two-pointer, sliding window, and prefix sum techniques.
String manipulation, pattern matching, and common algorithms like KMP and Rabin-Karp.
Singly and doubly linked lists. Master the fast-slow pointer technique for cycle detection and middle finding.
LIFO and FIFO data structures. Essential for expression evaluation, BFS, and monotonic stack problems.
Binary trees, BSTs, and tree traversals. Foundation for many interview problems.
Graph representations, traversals, shortest paths, and topological sorting.
DP is the most asked topic at FAANG. Master memoization, tabulation, and common DP patterns.
Hash maps and hash sets for O(1) lookups. Essential for frequency counting and two-sum type problems.
Sorting algorithms and binary search variations β fundamental to efficient problem solving.
Greedy algorithms make locally optimal choices at each step. Key is proving that local optimal leads to global optimal.
Systematic trial and error. Build solutions incrementally and abandon candidates that fail constraints.
Heaps efficiently find min/max elements. Essential for Top-K, merge K sorted lists, and scheduling problems.