Course 04 · Orientation
Graphs
Decision trees and adjacency
Choose, recurse, undo. Then graphs: floods, copies, dependency order, union-find, weighted shortest paths, and graphs built from data.
The course journey
Build one family of skills at a time
Each technique is three short lessons, and each one builds on the lesson before it. A lesson walks through one problem step by step, then hands it to you along with a few more to solve on your own.
- 01Start here
Backtracking
Choose, explore, unchoose: include or skip each element, place unused ones in order, and cut paths the moment a rule breaks.
- Stage 1Subsets & Include/Exclude DecisionsBranch on taking or skipping each element to explore
2^nsubsets1 Lesson · 3 Problems - Stage 2Permutations & Used-State TrackingPick any unused element next and undo the choice on return1 Lesson · 3 Problems
- Stage 3Constraint Pruning on Grids & BoardsAbandon partial paths the moment a placement violates a rule1 Lesson · 3 Problems
- Stage 1Subsets & Include/Exclude DecisionsBranch on taking or skipping each element to explore
- 02Pro
Graphs
Nodes, edges, and a visited set. Depth-first and breadth-first are the two walks.
Stage 1
Connected Components with DFS
Stage 2
Graph Traversal with a Visited Map
Stage 3
Topological Sort
- 03Pro
Advanced Graphs
Peel dependencies in layers, settle weighted shortest paths with a heap, and merge components with union-find.
Stage 1
Topological Sort & Indegree Queues
Stage 2
Weighted Shortest Paths (Dijkstra)
Stage 3
Union-Find (Disjoint Set)