Back to Question
How do you count the number of islands in a grid?
Question Explain
This problem asks to count connected groups of '1's in a 2D binary grid. It tests DFS/BFS and flood fill algorithms.
This problem asks to count connected groups of '1's in a 2D binary grid. It tests DFS/BFS and flood fill algorithms.