PATTERN 11 · 7 PROBLEMS
Graphs: traversal & ordering
Model relationships explicitly, mark visited state, and choose traversal order to match the question.
Start the first lesson ↗MASTER KEYNodes are facts; edges are allowed moves.
0OF 7
RECALLED
RECALLED
Each unseen land cell starts exactly one component traversal.
Not started
↗02Number of Islands
Each unseen land cell starts exactly one component traversal.
Not started
↗03Clone Graph
Cycles require remembering a clone before exploring neighbors.
Not started
↗04Pacific Atlantic Water Flow
Reverse the flow: from each ocean, climb to equal or higher neighbors.
Not started
↗05Course Schedule
A directed cycle is exactly the obstruction to a valid order.
Not started
↗06Number of Connected Components in an Undirected Graph
Every successful union merges two components.
Not started
↗07Graph Valid Tree
A tree with n nodes has n − 1 edges and one component.
Not started
↗Alien Dictionary
Only the first differing character between adjacent words creates an ordering edge.