Coding Patterns
The two dozen patterns behind interview problems, learned so you can spot them cold.
29 open lessons · practice and review with a pass
Part 0: Foundations
Cost before code, then a warm-up track of easy problems for anyone rusty.
Part I: Linear scans
One pass over an array or string, with the right thing remembered.
Part II: Invariants
Keep one condition true and the answer falls out.
Part III: Linked structures
Pointer recursion, then priority.
- Linked lists: How do you rewire a list without losing it?
- Trees: What does each subtree need to return so its parent can decide?
- Heaps: How do you keep the best k without sorting everything?
Part IV: Sort, choose, enumerate
Order the input, make safe choices, or try them all.
- Intervals and sweep: What order makes overlapping ranges easy?
- Greedy: When is the locally best choice provably safe?
- Backtracking: How do you enumerate every option without missing or repeating one?
- Tries: How do many words share their prefixes?
Part V: Graphs
Traversal, then order, then connectivity, then weights.
Part VI: Dynamic programming
From the easiest DP to spot to the hardest.
Part VII: Toolbox
Independent breadth: bits, maths, matrices, strings, design.
Part +: Optional deep dives
For roles that lean on competitive programming.
Open the course