Problem 200 · Medium

Number of Islands

BFS flood-fill on a 2-D grid — each unvisited land cell seeds a new island count.

Open the interactive visualisation