LeetCode 305: Number of Islands II
Problem Restatement We are given an empty m x n grid filled with water. Each operation turns one cell into land. After every operation, return the current number of islands. An island is a group of connected land cells connected horizontally or vertically. The official problem defines: Value Meaning 0 Water 1 Land The grid starts entirely with water. For each position in positions , we add land at that...