Problem: Number of Islands. Task: you are given a grid of ''s (land) and ''s (water). An island is formed by connecting adjacent lands horizontally or vertically. Count the number of islands. You will iterate through every cell.
When you find a '' that has not been visited, you have discovered a new island. Run DFS to mark all cells in that island, then continue searching. Each DFS call from the main loop corresponds to exactly one island.