Problem Overview
"Making A Large Island" (LeetCode 827) is a Meta interview problem involving a binary grid where 1s represent land and 0s represent water. You can change at most one 0 to 1, and the goal is to return the size of the largest possible island (4-directionally connected 1s) after this change.[1][9]
You are given an n × n binary matrix grid. You are allowed to change at most one 0 to be 1. Return the size of the largest island in grid after changing at most one 0 to 1. An island is a 4-directionally connected group of 1s (up, down, left, right).[3][9][1]
Input: grid = [,][1]
Output: 3
Explanation: Change one 0 to 1 (either position) to connect the two 1s into an island of size 3.[3][1]
Input: grid = [,][1]
Output: 4
Explanation: Change the 0 at (1,1) to 1, forming an island of size 4.[3][1]
Input: grid = [,][1]
Output: 4
Explanation: No 0 to change; existing island size is 4.[3]