Clone Graph - Leetcode 133 - Graphs (Python)

  Рет қаралды 5,932

Greg Hogg

Greg Hogg

Күн бұрын

Master Data Structures & Algorithms for FREE at AlgoMap.io/
Code solutions in Python, Java, C++ and JS for this can be found at my GitHub repo here: github.com/gah...
Complete DSA Pathway Zero to Hero: • Data Structures & Algo...
Please check my playlists for free DSA problem solutions:
• Fundamental DSA Theory
• Array & String Questions
• 2 Pointers Questions
• Sliding Window Questions
• Binary Search Questions
• Stack Questions
• Linked List Questions
• Tree Questions
• Heap Questions
• Recursive Backtracking...
• Graph Questions
• Dynamic Programming (D...
My Data Science & ML KZbin Playlist: • Greg's Path to Become ...
Learn Python and Data Science FASTER at mlnow.ai :)
Support the content: / @greghogg
Follow me on Instagram: / greghogg5
Connect with me on LinkedIn: / greghogg
Follow me on TikTok: / greghogg5
Coursera Plus: imp.i384100.ne...
My Favorite Courses:
Data Structures & Algorithms:
UCalifornia San Diego DSA: imp.i384100.ne...
Stanford Algorithms: imp.i384100.ne...
Python Data Structures: imp.i384100.ne...
Meta Coding Interview Prep: imp.i384100.ne...
Python:
UMichigan Python for Everybody: imp.i384100.ne...
Python Mastery from MLNOW.ai: mlnow.ai/cours...
Google IT Automation w/ Python: imp.i384100.ne...
Web Dev / Full Stack:
Meta Front-End Developer: imp.i384100.ne...
IBM Full Stack Developer: imp.i384100.ne...
Meta Back-End Developer: imp.i384100.ne...
John Hopkins HTML, CSS & JS: imp.i384100.ne...
IBM DevOps: imp.i384100.ne...
Cloud Development:
AWS Fundamentals: imp.i384100.ne...
GCP Cloud Engineer: imp.i384100.ne...
Microsoft Azure Fundamentals: imp.i384100.ne...
Game Development:
Michigan State Unity Development: imp.i384100.ne...
UColorado C++ for Unreal Engine: www.coursera.o...
SQL & Data Science:
SQL by MLNOW.ai: mlnow.ai/cours...
Python for Data Science by MLNOW.ai: mlnow.ai/cours...
Google Data Analytics: imp.i384100.ne...
IBM Data Science: imp.i384100.ne...
IBM Data Engineer: imp.i384100.ne...
Machine Learning & AI:
ML Mastery at MLNOW.ai: mlnow.ai/cours...
ML w/ Andrew Ng: www.coursera.o...
Deep Learning w/ Andrew Ng: imp.i384100.ne...

Пікірлер
@GregHogg
@GregHogg 6 ай бұрын
Master Data Structures & Algorithms For FREE at AlgoMap.io!
@printhaider
@printhaider 4 ай бұрын
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!
@SHIHJUIheh
@SHIHJUIheh 5 ай бұрын
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 5 ай бұрын
Glad to hear it ☺️☺️
@geetarjohn
@geetarjohn 5 ай бұрын
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.
@anujsharma9595
@anujsharma9595 9 ай бұрын
I like your way of teaching bro Comment from India
@GregHogg
@GregHogg 9 ай бұрын
Thank you so much! Reply from Toronto :)
@christianjt7018
@christianjt7018 6 ай бұрын
the explanation was really clear, thanks!
@GregHogg
@GregHogg 6 ай бұрын
You're flying through this!!
@christianjt7018
@christianjt7018 6 ай бұрын
@@GregHogg thanks Greg, your videos are very well explained, I have learned a lot
@GregHogg
@GregHogg 5 ай бұрын
@@christianjt7018 that's amazing 🤩🤩
@GarouNguyen
@GarouNguyen 7 ай бұрын
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 7 ай бұрын
Isn't it better to use DFS here instead?
@anthonygong100
@anthonygong100 6 ай бұрын
He is using DFS, there's just two passes instead of one
@2NormalHuman
@2NormalHuman Ай бұрын
he's using DFS but using Stack instead of recursion. Iterative approaches are faster than recursive approaches
@souvickmaity4867
@souvickmaity4867 9 ай бұрын
I also reply from India
@UrsKarthikHere
@UrsKarthikHere 7 ай бұрын
Indian
Rotting Oranges - Leetcode 994 - Graphs (Python)
16:09
Greg Hogg
Рет қаралды 5 М.
Clone Graph - Depth First Search - Leetcode 133
11:48
NeetCode
Рет қаралды 248 М.
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
Leetcode Or Die
35:30
ThePrimeTime
Рет қаралды 242 М.
Amazon Coding Interview Question - Clone Graph (LeetCode)
13:56
AlgosWithMichael
Рет қаралды 34 М.
Pacific Atlantic Water Flow - Leetcode 417 - Graphs (Python)
17:10
Clone graph | Leetcode #133
13:01
Techdose
Рет қаралды 60 М.
Neo4j (Graph Database) Crash Course
1:23:08
Laiture
Рет қаралды 257 М.
How I Mastered Data Structures and Algorithms in 8 Weeks
15:46
Aman Manazir
Рет қаралды 177 М.
Surrounded Regions - Graph - Leetcode 130 - Python
14:50
NeetCode
Рет қаралды 95 М.
Permutations - Leetcode 46 - Recursive Backtracking (Python)
9:42
Fibonacci Number - Leetcode 509 - Dynamic Programming (Python)
19:05
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН