Back to Questions

Number of Islands

93.3K viewsAsked at Amazon
Medium

Question Explain

Given an $m \times n$ 2D binary grid, return the number of islands. An island is formed by connecting adjacent '1's. Use DFS or BFS.

Start Trying This Question Simulation

Practice answering orally or with text to get instant AI feedback.

Practice with This Question
Number of Islands - Interview Question