Trees
Binary tree traversals, BST properties, Trie (prefix tree).
Tree problems decompose into three patterns. Traversals answer "given this tree, compute X" via DFS (pre/in/post) or BFS. BST properties exploit left < root < right for O(h) operations. Trie is a specialized tree shape for prefix-keyed lookup.
Binary Tree Traversals
Pre/in/post-order DFS + BFS level-order
BST Properties
In-order = sorted; O(h) search/insert/delete
Trie (Prefix Tree)
O(length) prefix operations
Finished reading?
Mark it done to track your progress in Interview.
Linked List Manipulation
Pointer rewiring on singly linked lists — reverse, merge, find middle (fast/slow), detect cycle (Floyd's), and the four ops that compose to solve almost any LL problem.
Binary Tree Traversals
Four canonical traversals — pre/in/post-order DFS and BFS level-order. When to use each, with the recursion-vs-iteration tradeoffs and the post-order compositional pattern that underlies most tree DP.