Overview - Number of Islands BFS and DFS
What is it?
Number of Islands is a problem where you count how many separate groups of connected 'land' cells exist in a grid. Each cell can be either land or water. We use BFS (Breadth-First Search) or DFS (Depth-First Search) to explore and mark connected land cells as one island.
Why it matters
This problem helps us understand how to explore connected areas in grids, which is useful in maps, image processing, and network analysis. Without this, we couldn't easily find clusters or groups in data arranged in grids, making many real-world tasks harder.
Where it fits
Before this, you should know basic arrays and loops. After this, you can learn graph traversal algorithms more deeply and solve related problems like shortest path or connected components.
