Max Area of Island - Leetcode 695 - Graphs (Python)

  Рет қаралды 4,046

Greg Hogg

Greg Hogg

Күн бұрын

Пікірлер: 23
@GregHogg
@GregHogg 5 ай бұрын
Master Data Structures & Algorithms For FREE at AlgoMap.io!
@kapilrules
@kapilrules 4 ай бұрын
@GregHogg you are awesome
@nicolofretti8601
@nicolofretti8601 3 ай бұрын
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 :)
@GregHogg
@GregHogg 3 ай бұрын
Thank you for such a kind comment 🙏🏼
@laharianegama5004
@laharianegama5004 Ай бұрын
Greg, thank you for making such content. This is a game changer for me.
@anshpradhan1954
@anshpradhan1954 4 ай бұрын
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 😂😂😂
@GregHogg
@GregHogg 4 ай бұрын
Leetcode is definitely easiest in Python lol
@KaushikkrSarma
@KaushikkrSarma 5 ай бұрын
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 👍
@GregHogg
@GregHogg 5 ай бұрын
That's amazing! Very glad to hear it
@leonardodanelutti4490
@leonardodanelutti4490 2 ай бұрын
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
@leonardodanelutti4490
@leonardodanelutti4490 2 ай бұрын
This should have a time complexity of theta(m*n), space complexity of theta(Min{m,n}) and be much faster in practice
@amazingmanish
@amazingmanish 7 ай бұрын
I thought of the same solution but forgot that it's actually DFS. Nice explanation. Good work buddy.
@GregHogg
@GregHogg 7 ай бұрын
Oh awesome! Thanks a bunch!
@anirudd01
@anirudd01 7 ай бұрын
This was amazing, you made it look easy , but yea it is easy now thanks to you, keep up the good work
@GregHogg
@GregHogg 7 ай бұрын
Super super glad to hear it. Thanks a ton 😊
@PhonesUnboxing
@PhonesUnboxing 6 ай бұрын
Can use BFS as well
@SimpChimp-zl3ns
@SimpChimp-zl3ns 2 ай бұрын
3:24 that siren got me looking thru the my window 😅😂
@GarouNguyen
@GarouNguyen 5 ай бұрын
Bro you nail djt I understand, thank you bro
@marknuggets
@marknuggets 7 ай бұрын
Lol amazing quality
@GregHogg
@GregHogg 7 ай бұрын
Thank you so much!
@antonmykhailovskyi447
@antonmykhailovskyi447 7 ай бұрын
However, you are doing backtracking here and not dfs, aren`t you? Or am I missing something?
@GregHogg
@GregHogg 7 ай бұрын
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.
@antonmykhailovskyi447
@antonmykhailovskyi447 7 ай бұрын
@@GregHogg got it, thank you! I'm kind of new in this sphere, so I was a bit confused
Clone Graph - Leetcode 133 - Graphs (Python)
13:38
Greg Hogg
Рет қаралды 4,6 М.
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
Making an Algorithm Faster
30:08
NeetCodeIO
Рет қаралды 183 М.
Rotting Oranges - Leetcode 994 - Graphs (Python)
16:09
Greg Hogg
Рет қаралды 4,1 М.
The Truth About Learning Python in 2024
9:38
Internet Made Coder
Рет қаралды 226 М.
Pacific Atlantic Water Flow - Leetcode 417 - Graphs (Python)
17:10
How I would learn Leetcode if I could start over
18:03
NeetCodeIO
Рет қаралды 746 М.
How Senior Programmers ACTUALLY Write Code
13:37
Thriving Technologist
Рет қаралды 1,6 МЛН
Same Tree - Leetcode 100 - Python
7:52
NeetCode
Рет қаралды 134 М.
PirateSoftware is right, this needs to stop
15:14
Theo - t3․gg
Рет қаралды 758 М.
Learn Machine Learning Like a GENIUS and Not Waste Time
15:03
Infinite Codes
Рет қаралды 316 М.
Number of Islands - Leetcode 200 - Graphs (Python)
11:01
Greg Hogg
Рет қаралды 12 М.
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН