// Number of Islands — MEDIUM
// Category: graph
Given an `m x n` grid of `'1'` (land) and `'0'` (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent (horizontally or vertically) land cells.
Hint: Use DFS or BFS. For each unvisited `'1'`, start a search and mark all connected land cells as visited. Increment a counter for each search started.
Example: grid = [["1","1","1","1","0"],["1","1","0","1","0"],["1","1","0","0","0"],["0","0","0","0","0"]]
Output: 1