You are given an m x n binary matrix grid. A cell with value 1 represents land and a cell with value 0 represents water.
An island is a maximal group of 1s connected horizontally or vertically. The area of an island is the number of cells in it.
Return the maximum area of an island in grid. If there is no island, return 0.
0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 1 0 0 0 1 0 0 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0
Input: grid above Output: 6 Explanation: The island in the bottom-right area has 6 connected land cells, which is the largest.
Input: grid = [[0,0,0,0,0,0,0,0]] Output: 0 Explanation: There are no land cells, so no island exists.
m == grid.lengthn == grid[i].length1 <= m, n <= 50grid[i][j] is 0 or 18x13 grid with multiple islands, max area = 6