Question: You are given an n n binary matrix grid. You are allowed to change at most one to to be 1 . Return the size

You are given an nn binary matrix grid. You are allowed to change at most one to to be 1.
Return the size of the targest isfand in grid after applying this operation.
An island is a 4-directionaly connected group of 1 s .
Example 1:
Input: grid [[1,8),{8,1}
You are given an n n binary matrix grid. You are

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!