The thing I love most about great channels using manim, is that i never feel like im watching a 3B1B rip-off, just an intelligent explanation of a topic. Keep up the amazing videos
This is the best video on this! I love this channel, it is going to become really popular! Thank you! Love the animations. And the design.
great video! I'll also point out (as a few others have hinted) that the iterative approach is very important for large graphs. Default stack sizes on modern OS' are still typically quite small, and it's easy to construct pathological graphs which will cause a stack overflow with a recursive DFS implementation. Using an explicit (and heap-allocated) stack as in the iterative approach works around this (until the machine runs out of memory, of course!), and is a crucial reason why this approach is often chosen.
The presentation of how to use a stack and pop together was really interesting. I always had trouble with while loops, this pattern makes it so apparent when it is best used.
One thing that I love about this channel is that, because the quality is so huge, all the comments will start praising the video but also adding new information and providing constructive feedback. I think that people feel compelled to give some retribution after watching such a great video for free.
i can feel your effort man, the planning, research, animation, music.. I'm glad i came across this channel.... you gonna get huge success..
By the way, a very interesting point is that you can convert any recursive function into a stack + while len(stack) > 0 loop because basically that's exactly how computers do that on a low level anyway. In some languages it has some advantages, because while function call stack may be limited, a stack as a structure is practically unlimited, and that lets us achieve very deep levels of recursion without stumbling into stack overflow.
This was a great video, explaining not only DFS, but both recursive and iterative versions of it, and presenting applications for DFS, all accompanied by illustrations to make it even more clear. Cant thank you enough!
"Intiution", "come up on your own", "invent yourself", these 3b1b words are just magical
The video is great, as always. However, I have a suggestion: maybe at the end of the video, you can ask some graph questions and let us think how to slove, and finally, you can give the java or python code and the step of it. (just like your recursion video because your recursion video is absolutely amazing.)
absolutely the best explanation on DFS that I have encountered. Please make more videos on graph theory and algorithms.
2:22 is an example of the classic Cycle Detection algorithm where DFS is used to detect any cycle in a graph G. Child node 2 has a "back-edge" that connects it with the root node 0. This is basically a cycle in the graph.
I appreciate that you included the iterative approach to solving DFS using a stack. I am preparing for coding interviews, and I read that a candidate was asked to solve a graph problem at Google, and he used DFS. When the interviewer asked how he could solve the problem using a stack, he was completely stumped because he didn't know about that approach. Thanks for this!
Literally just learned about this in class today and it popped up in my recommendation. YouTube algorithm is getting insane.
best explanation. I have spent a long time trying to learn this. Your visualization has made a HUGE difference.
Well structured, easy to follow, beautiful graphics, use of video chapters and real world use cases included. What can I expect more? Superb video.
The only channel that walkthrough the code and explain the concept in detail. Not every youtube channel do this.
The way we designed the animation and the calmness of your voice in the time of explanation and the depth of your discussion just blow my mind. May Almighty Bless You💝
Your content is incredibly good. It's not only comprehensive and to the point, but also enjoyable. Thank you for all the effort you are putting in.
@hetsmiecht1029