Clone Graph - Leetcode 133 - Graphs (Python)

  Рет қаралды 3,897

Greg Hogg

Greg Hogg

Күн бұрын

Пікірлер: 16
@GregHogg
@GregHogg 4 ай бұрын
Master Data Structures & Algorithms For FREE at AlgoMap.io!
@printhaider
@printhaider Ай бұрын
I'm going to be honest, I really love your explanations. You do it best! Everytime I have any problem trying to understand any blind 75 or the 150 list problem I always search "[input problem] Greg Hogg". I hope you keep it up and I look forward to learning more from your future videos!
@geetarjohn
@geetarjohn 2 ай бұрын
Thanks, this was very helpful. I paused after you described the approach and then implemented my own version of the solution based on your strategy. My differences were: 1. Using recursive DFS to save on a stack. 2. I doubled the use of my old-to-new mapping dict as a visited set. Because the keys to the dict have to be unique anyway. Not sure that significantly improves efficiency or anything but it did work.
@SHIHJUIheh
@SHIHJUIheh 3 ай бұрын
Thank you for providing such a great explanation. This is the most clearest explanation I 've seen on the entire internet. Not only did you provide the solution, but you also explained the underlying concepts!
@GregHogg
@GregHogg 3 ай бұрын
Glad to hear it ☺️☺️
@anujsharma9595
@anujsharma9595 6 ай бұрын
I like your way of teaching bro Comment from India
@GregHogg
@GregHogg 6 ай бұрын
Thank you so much! Reply from Toronto :)
@christianjt7018
@christianjt7018 3 ай бұрын
the explanation was really clear, thanks!
@GregHogg
@GregHogg 3 ай бұрын
You're flying through this!!
@christianjt7018
@christianjt7018 3 ай бұрын
@@GregHogg thanks Greg, your videos are very well explained, I have learned a lot
@GregHogg
@GregHogg 3 ай бұрын
@@christianjt7018 that's amazing 🤩🤩
@GarouNguyen
@GarouNguyen 4 ай бұрын
hash_map[node] = Node(val=node.val) why it has the rigth to access neighbours atteibute? Why just not Node() bro can you explain, I don't understand
@keltoro
@keltoro 5 ай бұрын
Isn't it better to use DFS here instead?
@anthonygong100
@anthonygong100 3 ай бұрын
He is using DFS, there's just two passes instead of one
@souvickmaity4867
@souvickmaity4867 6 ай бұрын
I also reply from India
@UrsKarthikHere
@UrsKarthikHere 4 ай бұрын
Indian
Rotting Oranges - Leetcode 994 - Graphs (Python)
16:09
Greg Hogg
Рет қаралды 3,4 М.
Amazon Coding Interview Question - Clone Graph (LeetCode)
13:56
AlgosWithMichael
Рет қаралды 33 М.
When u fight over the armrest
00:41
Adam W
Рет қаралды 31 МЛН
Миллионер | 3 - серия
36:09
Million Show
Рет қаралды 2 МЛН
Pacific Atlantic Water Flow - Leetcode 417 - Graphs (Python)
17:10
How I Mastered Data Structures and Algorithms in 8 Weeks
15:46
Aman Manazir
Рет қаралды 94 М.
This Algorithm is 1,606,240% FASTER
13:31
ThePrimeagen
Рет қаралды 852 М.
Clone graph | Leetcode #133
13:01
Techdose
Рет қаралды 59 М.
The Truth About Learning Python in 2024
9:38
Internet Made Coder
Рет қаралды 215 М.
When u fight over the armrest
00:41
Adam W
Рет қаралды 31 МЛН