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).
Problems0 of 5 solved
- Not startedNumber of Islandsflood fill DFS/BFS over gridmedium
- Not startedMax Area of IslandDFS flood fill accumulating areamedium
- Not startedClone GraphDFS/BFS with hash map original → clonemedium
- Not startedSurrounded RegionsDFS from border to mark unsurrounded regionsmedium
- Not startedPacific Atlantic Water Flowreverse DFS from both ocean borders, intersectmedium