Thank you, Greg! I love your teaching approach. You start by explaining problems from a high-level perspective, helping us understand the logic behind the solution. 🧠 Then, you dive deep into the source code. 💻 Your work is truly appreciated :)
Greg, I must say, Im in love with python cuz of you, thank you, python being on of those languages, which is easy to learn BUT hard to master, you did a pretty good job at convincing me to use it for solving leetcode problems, leetcode seems easier with python idk why 😂😂😂
Your explanation is really good , your website is awesome as well . I could finally do a graph problem on my own , all thanks to you greg , keep going 👍
Can you just iter on every element of the matrix and do this operation when enconutering a 1: m[i][j] = m[i-1][j] + m[i][j-1] - m[i-1][j-1] + 1 And then return the max value obtained
There's an absurdly tiny difference between backtracking and DFS. Technically this is dfs because when we make a land (1) a water (0), we never undo (backtrack) this modification.
Master Data Structures & Algorithms For FREE at AlgoMap.io!
@GregHogg you are awesome
Thank you, Greg! I love your teaching approach. You start by explaining problems from a high-level perspective, helping us understand the logic behind the solution. 🧠 Then, you dive deep into the source code. 💻 Your work is truly appreciated :)
Thank you for such a kind comment 🙏🏼
Greg, I must say, Im in love with python cuz of you, thank you, python being on of those languages, which is easy to learn BUT hard to master, you did a pretty good job at convincing me to use it for solving leetcode problems, leetcode seems easier with python idk why 😂😂😂
Leetcode is definitely easiest in Python lol
Greg, thank you for making such content. This is a game changer for me.
Your explanation is really good , your website is awesome as well . I could finally do a graph problem on my own , all thanks to you greg , keep going 👍
That's amazing! Very glad to hear it
I thought of the same solution but forgot that it's actually DFS. Nice explanation. Good work buddy.
Oh awesome! Thanks a bunch!
This was amazing, you made it look easy , but yea it is easy now thanks to you, keep up the good work
Super super glad to hear it. Thanks a ton 😊
Bro you nail djt I understand, thank you bro
3:24 that siren got me looking thru the my window 😅😂
Can you just iter on every element of the matrix and do this operation when enconutering a 1:
m[i][j] = m[i-1][j] + m[i][j-1] - m[i-1][j-1] + 1
And then return the max value obtained
This should have a time complexity of theta(m*n), space complexity of theta(Min{m,n}) and be much faster in practice
Can use BFS as well
Lol amazing quality
Thank you so much!
However, you are doing backtracking here and not dfs, aren`t you? Or am I missing something?
There's an absurdly tiny difference between backtracking and DFS. Technically this is dfs because when we make a land (1) a water (0), we never undo (backtrack) this modification.
@@GregHogg got it, thank you! I'm kind of new in this sphere, so I was a bit confused