Given an m x n 2D binary grid grid of '1's (land) and '0's (water), return the number of islands.
An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are surrounded by water.
grid = [ ["1","1","1","1","0"], ["1","1","0","1","0"], ["1","1","0","0","0"], ["0","0","0","0","0"] ]
Input: grid above Output: 1 Explanation: All the land cells are connected - they form a single island.
grid = [ ["1","1","0","0","0"], ["1","1","0","0","0"], ["0","0","1","0","0"], ["0","0","0","1","1"] ]
Input: grid above Output: 3 Explanation: There are three separate groups of land cells.
m == grid.lengthn == grid[i].length1 <= m, n <= 300grid[i][j] is '0' or '1'grid = 4×5, all land connected into one island