Graphs
DFS / BFS / Islands, Topological Sort, Union-Find, Shortest Paths.
Graphs are where interview difficulty ramps up. The four patterns here cover the bulk of graph problems you'll see at FAANG — connectivity, ordering, dynamic merging, and weighted shortest paths.
Graph DFS / BFS / Islands
Generic traversal + 2D grid flood fill
Topological Sort
DAG ordering via Kahn's BFS or DFS post-order
Union-Find (DSU)
Dynamic connectivity with path compression + union by rank
Shortest Paths
Dijkstra (non-negative weights); Bellman-Ford for negative edges
Finished reading?
Mark it done to track your progress in Interview.
Trie (Prefix Tree)
A branching tree of characters supporting prefix insertion and search in O(length). The unlock for autocomplete, dictionary search, word puzzles, and IP routing.
DFS / BFS / Islands
Generic graph traversal — depth-first for connectivity and recursion-friendly problems; breadth-first for shortest path in unweighted graphs; flood fill for 2D grid problems.