grid holds 1 (land) and 0 (water). Return the number of cells in the largest island (land cells connected up, down, left or right), or 0 if there is no land.
For [[1, 1, 0], [0, 1, 0], [0, 0, 1]] the answer is 3.
Example 1
Input:
max_island_area([[1, 1, 0], [0, 1, 0], [0, 0, 1]])
Output:
3
Example 2
Input:
max_island_area([[0]])
Output:
0
0 <= rows, cols <= 3000 or 1.No results yet
Run your code to check it against the examples, or submit to run every test.