Practice45 min

Practice: Flood Fill & Regions

Grid DFS for islands, areas, border-connected regions, and dual-ocean reachability, plus graph cloning.

Five flood-fill workouts: count islands, measure the biggest one, clone a graph node-by-node with a visited map, then two problems that flip the direction of thought — start the fill from the border (Surrounded Regions) and from the oceans inward (Pacific Atlantic).

Solving all problems completes this lesson automatically.