Making A Large Island || Google Question || Code + Explanation
Vložit
- čas přidán 3. 08. 2021
- You are given an n x 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 applying this operation.
An island is a 4-directionally connected group of 1s.
Link to challenge : leetcode.com/explore/challeng...
nice approach. Thanks!!!
Great explanation mam 😊
this is great graph question and clean explanation..
Absolute clear explanation
Very nice explanation, Thank You.☺
thanks ma'am for great explanation
😍
Awesome Explained Di, Thankyou so much
can we do't do it by simply calling dfs on every zero occurence by changing it to 1 and for every call we store the no of ones and at finally return answer.
great explanation
Wow ❤️
👍👍💯
Waah consistency ek din main 3 videos 😂🤦🏼♂️
I spent one and half hours understanding and writing code :
class Solution:
def dfs(self,i,j,grid):
if 0