Graph Data Structure | Part 5 | Depth First Search and Traversal | DFS

preview_player
Показать описание
Chapters:
00:00 - Intro
00:54 - Why is graph traversal different?
04:02 - Depth First Traversal
10:03 - Code (Iterative DFS)
13:44 - Code (Recursive DFS)
16:10 - Visualizing DFS
18:15 - Final Thoughts

📚 Links to topics I talk about in the video:

📖 Reference Books:

🎥 My Recording Gear:

💻 Get Social 💻

#graphs #datastructures #interview
Рекомендации по теме
Комментарии
Автор

You are simply super Nikhil. You make things so simple and easy to understand, no matter how complex the topic is. 👍

KoundinyaKoorapati-ov
Автор

Hi bro! I am really surprised why there are less subscribers here! Your explanation is very clear and illustration is also very good. Other sites have poor explanation but more subscribers. Hope you reach more audience soon! All the best.
You made graphs super easy for me. Thank you.

jjoelthomas
Автор

Great explanation, I'd love to know where the adjacency list was defined in the program. Many thanks

kchemutai
Автор

I like it when you said 'iterative version is better', even I like iterative better anyday 😀

RajeshS-nj
Автор

Thank you for the amazing detailed explanation!

ashok
Автор

Amazing Explanation Nikhil. Very clear and not confusing at all. Appreciate all your hard work!

krishnavadlamudi
Автор

Nikhil, you are my #1 favorite programmer on YouTube. I love your lessons! I'm so excited to review your graph data structure series!

matthewzarate
Автор

When you pop 3 (at 13:12) then you should be checking to append 2, 2 is not visited, so it would theoretically go on your stack again [2, 2]. Right?
Does this mean that when you go to pop it from the stack and add it to the set you Should be checking if the node is already in the set?

lo_sten
Автор

Why can't you use queue instead of stack?

sounaksaha
Автор

Hi bro, your really awesome in explaining solutions very understandable, keep doing brother. I have one question that was asked in coding round which I can't solve, could you please make one video regarding explaining the solution of it. Question -> swap all characters inside every prefect paranthesis. I/P = ( abcd) O/P =( dcba ), I/P = ( a(bc)d ) O/P = (d(bc)a), I/P = (a(b(cd)e)f) O/P =(f (b (dc) e) a).

saravsaro
Автор

Hi, when we code iterate version should'nt we add this before print it out.
if
continue;
Because we get duplicate. You mention in theory but neglect it in code . Am i wrong?
Great explanation btw. keep it up love your videos, really helpful, i learnt a lot from you <3

beratoztas