grid holds 0 (water) and 1 (land). You may change at most one 0 to 1. Return the size of the largest island (land cells connected up, down, left or right) you can get.
For [[1, 0], [0, 1]] the answer is 3.
Example 1
Input:
largest_island([[1, 0], [0, 1]])
Output:
3
Example 2
Input:
largest_island([[1, 1], [1, 1]])
Output:
4
0 <= rows, cols <= 3000 or 1.No results yet
Run your code to check it against the examples, or submit to run every test.