Given a grid of `1` (land) and `0` (water), implement `numIslands(grid)` returning the number of islands. Islands connect horizontally or vertically.
+ 1 hidden test run on Submit.
DFS/flood-fill from each unvisited land cell counts components in O(rows * cols) time.
Run your code to see results.