Graph Data Structure | Part 6 | Breadth First Search and Traversal | BFS

preview_player
Показать описание
Chapters:
00:00 - Intro
01:10 - BFS vs DFS Visually
08:00 - Breadth First Traversal
13:05 - Code (Iterative BFS)
15:45 - Applications & Examples
19:31 - Final Thoughts

📚 Links to topics I talk about in the video:

📖 Reference Books:

🎥 My Recording Gear:

💻 Get Social 💻

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

Amazing explanation. Keep going like this. Don't disheartened by less views. You are gem.

utkarshsharma
Автор

You are a blessing in the world of programming sir.

introvertwhiz-llip
Автор

simple sketches, clean code, Awesome explantion.. pls dont stop!

viveksundli
Автор

Thank you sir for the wonderful explanation

tanishkaagarwal
Автор

keep it up Bro... Doing well Job... Thank you

jaydeepvasoya
Автор

I was wondering in your explanation of the BFS you add a node to the visited Set only once it's popped from the Queue which makes sense intuitively similar to DFS. However in your code explanation you mark a node as visited one line after its being added to the queue. Can you explain this and does it make a difference? Which is correct? Thanks for your comprehensive videos

skyline
Автор

the map in the video give us the idea that you are living in New York . I was thinking that you are living in India😄. Bye the way, the explaination is so clear and understandable to me.

vipulaggarwal
Автор

Why do you visited.add in the IF statement since you haven't visited the node yet, and at this point you are just checking for neighbors?

lo_sten
Автор

One question or Doubt:: You were not checking whether popped element from the queue is visited or not in the code.. without tis check you were printing ..SO there is a possibility of getting a node printed more than one time likewise in the case of example you explained before code..

unique_ruler_memes
Автор

I think it'd make a bit more clearer if you add to the visited nodes once pulled from the queue.

shenth
Автор

I'm confused, Why do we mark a node as visited as soon as we add it into the queue as oppose to while we are actually polling it in the code? in DFS we only marked a node as visited when we popped it from the stack.

InfiniteRedditEpisodes