Detect Cycle in Directed Graph Algorithm

preview_player
Показать описание

Detect cycle in directed graph using depth first search.
Рекомендации по теме
Комментарии
Автор

This is one of the best videos of explaining concepts on YouTube, no joke.

DeadJuicebox
Автор

This is the best video on this topic. If anybody is reading this. You don't need to search for more!!

sankalparora
Автор

Hope YouTube gives a lot of money for your videos because they are priceless:D

szilagyizoltan
Автор

I spent two hrs just search online try to understand this kinda problem until I saw your video. Thank you so much. U are the only one I saw that really want to explain in detail to us.

masonliu
Автор

old is gold here
there are lot of new YouTubers just giving solutions for the qouestions
where this guy taught the very basic algo of those solution in simplest way a long ago
thank you buddy

VIJAYKUMAR-djkf
Автор

Couldn't find a better explanation on web than this one. Awesome job Tushar!

rohishd
Автор

i spent 1/3 today at work figuring out how to detect cycles in a statemachine. In the end I decided to represent the states and events (transitions) as a graph. My final solution was close to yours but I operate with one stack for explored nodes and if the the neighbor is in there i have a cycle.
I think maybe your solution is better because you don't have redundand explorations (ever), but my solution might have redundant traversals.
It's not significant for me because the tree only contains 6-40 nodes, but for bigger trees your solution is absolutely better!
excellent video :) ty!

jazzochannel
Автор

for every tedious problem, i read through multiple things and final destination always turns out to be your videos. :D

himanshusainig
Автор

I want to thank you for the effort you've put in these videos. I've had a really bad teacher on this topic, but everything makes sense when you explain it.

jenspeter
Автор

seriously man you are the only youtuber who tells the intuition. Other youtubers just dry run the code of gfg.

akshyagarg
Автор

Congrats, Roy.
What a good job. The best explanation I've seen so far!

tiagOOOOOOOliveira
Автор

Thanks Tushar, this by far the most clear explanation for this algorithm!!

ngcster
Автор

Thank you this was useful . We can even use topological sort done by calculating in-degree to find a cycle

FirefoxGuy
Автор

Thanks so much for this! I was stuck on a problem for weeks and was out of ideas. This helped me think it through from a different perspective and figure it out. I really appreciate your time and effort in putting these tutorials online.

kmathews
Автор

Too good Tushar!! Simplest solution for detecting cycle in directed graphs. 👏🏻

akshayjaiswal
Автор

This was very helpful. Clearly explained with example, and is indeed comprehensive. Thanks @Tushar Roy!

achintsatsangi
Автор

The best explaining video I've found in the internet !

giaonguyen
Автор

This code is perfect example of good code quality. At the same time code make sure the system is in consistent state, most of the other youtube videos will leave the color and visited array in inconsistent state.

bharat_arora
Автор

This was exactly what I needed. Thank you!

LindseyMysse
Автор

Greetings from Peru, this video will help me a lot tomorrow in my presentation at the university

emmanuels.r
welcome to shbcf.ru