Problem
Count the number of connected components of land in the grid.
Example 1
Input: grid = [["1","1","0"],["1","0","0"],["0","0","1"]]
Output: 2
Constraints
- 1 <= m, n <= 300
Notes
- Focus on the underlying bfs pattern.
- Write the cleanest correct solution before optimizing further.
- Hidden tests cover larger edge cases than the visible examples.