Search⌘ K
AI Features

Solution: Number of Islands II

Solution: Number of Islands II tracks islands as an initially flooded grid gains land at specified cells, returning the island count after each operation; diagonal cells remain separate.

Statements

You are given a 2D2D binary grid of size m×nm × n. In this grid, 00 represents water and 11 ...