Very good explanation. Really helped me wrap my head around topological sorting with just this video, even though it's the first time I have heard of it.Thank you, make more!
I think your graph representation is confusing. Because for [1, 0] prereq, you drawed as 0 --> 1 like 0 is dependent to 1. But in this case 1 is dependent to 0 (we have to take course 0 before course 1, so course 1 depends on course 0)
Thanks a lot for the video. I tried a BFS with a set that keeps track of already visited nodes for cycle detection but that didn't seem to work, any ideas on as to why?
BFS with only a set will sometimes falsely detect a cycle in a directed graph. Imagine a graph: 0 -> 1, 1 -> 2, 0 -> 2. So there are two directed edges going into 2. If you start from 0, BFS will detect a cycle because you'll visit 2 twice, but because of the direction of the edges, there is actually no cycle.
so underrated! your explanation with examples of both cases is perfect for making me understand and visualise :) Thank you!
Everything you highlight in the video is very helpful, it must take you a lot of time to edit the videos. I appreciate the effort. Keep it up :)
Marvelous Explanation.....Please do more of the videos like these....
One of the best explanation videos i have seen so far.. You have earned a subscriber. Well-done brother!!!❤
This is a very beautiful explanation. Thanks a lot!!
Very good explanation. Really helped me wrap my head around topological sorting with just this video, even though it's the first time I have heard of it.Thank you, make more!
Incredible explanation. I loved how you showed all steps along with visualisation. Thanks a lot.
I like not only explanation, but also visualization. Well done, boy))
I think your graph representation is confusing. Because for [1, 0] prereq, you drawed as 0 --> 1 like 0 is dependent to 1. But in this case 1 is dependent to 0 (we have to take course 0 before course 1, so course 1 depends on course 0)
Great Explanation and very clear and understanding visualization , Thanks for helping and keep going ;)
what a video mahn goddamn. Please do more videos!! I keep waiting for more
Extremely easy to understand and visuzalize. Thanksss a lot!!
wouldn't it be better to use double ended queue instead of list to implement the 'queue' variable?
Thanks a lot for the video. I tried a BFS with a set that keeps track of already visited nodes for cycle detection but that didn't seem to work, any ideas on as to why?
BFS with only a set will sometimes falsely detect a cycle in a directed graph. Imagine a graph: 0 -> 1, 1 -> 2, 0 -> 2. So there are two directed edges going into 2. If you start from 0, BFS will detect a cycle because you'll visit 2 twice, but because of the direction of the edges, there is actually no cycle.
@@AlgoEngine Oh yes that makes sense. Thank you!