Making a Large Island
CodingPhone Screen, OnsiteSoftware EngineerReported Oct, 2025
Examples
Example 1:
Input: grid = [[1,0],[0,1]]
Output: 3
Explanation:
Example 2:
Input: grid = [[1,1],[1,0]]
Output: 4
Explanation:
Example 3:
Input: grid = [[1,1],[1,1]]
Output: 4
Explanation: