Strongly Connected Components Kosaraju's Algorithm Graph Algorithm

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ส.ค. 2015
  • Find all strongly connected components in directed graph.
    / tusharroy25
    github.com/mission-peace/inte...
    github.com/mission-peace/inte...

ความคิดเห็น • 244

  • @clyt9636
    @clyt9636 8 ปีที่แล้ว +163

    wonderfully explained the intuition. most videos on TH-cam give the algorithm without justifying the steps.

    • @maybejorn6619
      @maybejorn6619 8 ปีที่แล้ว +5

      I second that :)

    • @al-b
      @al-b 7 ปีที่แล้ว +15

      I agree. The intuition explanation was so helpful to my understanding of this algorithm, as well as to my understanding of graph behavior in general. Thank you!

    • @tusharroy2525
      @tusharroy2525  7 ปีที่แล้ว +20

      Welcome

    • @gxtube
      @gxtube 4 ปีที่แล้ว

      very good explanation of the intuition on why the first step is topological sort. and then DFS on the reversed graph based on the order of the topological sort.

    • @tumte4305
      @tumte4305 4 ปีที่แล้ว

      Yeah , you have been my goto person during this lockdown. Basically, whenever I get to know of some algorithm during CP which I need to learn, I head to your channel to see whether you had explained it or not.
      Just one thing : the plural of child is children and not childrens :)

  • @sandip_kanzariya8476
    @sandip_kanzariya8476 ปีที่แล้ว +2

    Why this algorithm is work ? Make difference between you and other instructor ✨✨✨✨
    Nice !!! Superb

  • @newworldorder25
    @newworldorder25 7 ปีที่แล้ว +55

    Very nice explanation of the intuition.
    "By intuition that we discover and by logic that we prove" - Henri Poincaré

  • @EmilyXieX
    @EmilyXieX 7 ปีที่แล้ว +2

    This is beautifully explained. I was struggling to find an intuitive explanation for why this algorithm works until I found this video. Thank you!

  • @praveenchaudhary235
    @praveenchaudhary235 6 ปีที่แล้ว +1

    Great job. Whenever I search any algo on TH-cam I search for your videos first. You explain everything simply and quickly.

  • @nfstephe5160
    @nfstephe5160 4 ปีที่แล้ว +10

    Wow, clear and straightforward explanation, wish I could give two likes!

  • @elvindu743
    @elvindu743 8 ปีที่แล้ว +1

    Nice video Tushar! I recognized you at the first sight of this video. It is very clear explanation and really helps me understand the intuition. Thx!

  • @NIKHILSRIVASTAVABCS
    @NIKHILSRIVASTAVABCS 7 ปีที่แล้ว +1

    He makes it look so simple!
    Hats-off to him :)

  • @timothygao9442
    @timothygao9442 3 ปีที่แล้ว +2

    You should keep making videos man... They are honestly some of the best videos on youtube for algorithms and data structures.

  • @gourharisharma9373
    @gourharisharma9373 3 ปีที่แล้ว +1

    I always wondered why a stack was used when a visited array could do the task. I searched a lot to find the reason and finally understood after landing here. Thank You for your service to the Community.

  • @albertagram
    @albertagram 9 ปีที่แล้ว

    I've been stuck on this for months. Finally... thank you!

  • @pranavambhore9215
    @pranavambhore9215 4 ปีที่แล้ว +8

    Nice one. In nutshell, we are topologically sorting the underlying DAG of reverse graph (with connected components as vertices), so that one strongly connected component cannot be traced from another strongly connected component.

    • @jiakai7254
      @jiakai7254 ปีที่แล้ว

      that's a really elegant explanation! I wish the Algorithm Design Manual explained it like that

  • @Lamelija
    @Lamelija 3 ปีที่แล้ว

    Thank you! I've watched like 6 different videos and non of them helped do my homework, because none of them actually did a proper step by step explanation. But yours did! So thank you, I can finally do my homework and upload it.

  • @nitinjain1325
    @nitinjain1325 6 ปีที่แล้ว

    adbhut avishwaniya .. itna accha explanation .. bahut kam hi dekhne milta hai ...
    great tushar bhai ! !

  • @MarcosCastroSouza
    @MarcosCastroSouza 8 ปีที่แล้ว +8

    excellent explanation, thanks!

  • @harishsurya3975
    @harishsurya3975 7 ปีที่แล้ว +4

    I was stuck at this topic for an hour or so. Thank you for explaining with an example. Not only it was so easy to understand, no i believe that i can teach it somebody else too.

  • @rajatkoujalagi9203
    @rajatkoujalagi9203 8 ปีที่แล้ว +3

    Thanks for the video.
    Might be helpful to mention that the first pass of populating the stack is similar to topological sort.

  • @rishabhsharma8234
    @rishabhsharma8234 4 ปีที่แล้ว

    Amazing explanation of that guaranteed exploration part of vertices that makes the concept crystal clear.Thanks

  • @sarwarmehedi
    @sarwarmehedi 6 ปีที่แล้ว

    Wonderfully explained. A lot to learn from you. Keep up the good works.

  • @Chesstreamer
    @Chesstreamer 4 ปีที่แล้ว

    wonderful expalnation and the best part was now u are implememting the concept via code in your video.
    Earlier your videos gave insight but lack of code was a issue for me at least.Kudos to u ,keep going

  • @zengjun7
    @zengjun7 7 ปีที่แล้ว

    clear illustration. all your videos are so awesome. thank you for your effort

  • @effy1219
    @effy1219 7 ปีที่แล้ว

    excellent !!!!!!!!!!!!!!!!!!!!!!!!!!!!! amazing to have you in youtube!!!!

  • @BullsEye2.0
    @BullsEye2.0 6 ปีที่แล้ว

    Dude, you are awesome,
    You finished all my doubts that came into my mind sequentially while watching this video.
    Hats off _/\_

  • @tmeloliveira
    @tmeloliveira 6 ปีที่แล้ว

    Great work! Thanks for putting up this awesome video! It really helped my studies.

  • @gallucciluca94
    @gallucciluca94 5 ปีที่แล้ว

    Perfect explanation step by step. Good job 👍

  • @tirthjayswal9895
    @tirthjayswal9895 3 ปีที่แล้ว

    Every time when I want to revise SCC I see this Video. Best Explanation

  • @supreethbaliga7353
    @supreethbaliga7353 4 ปีที่แล้ว

    The explanation was very well explained. Thank you so much!!

  • @msylvest55
    @msylvest55 8 ปีที่แล้ว

    Tushar you are the man...helping many students in my algo class handle biz

  • @omprakashsharma9767
    @omprakashsharma9767 4 ปีที่แล้ว

    Thanks tushar, I was actually looking why this algorithm works. This helps me a lot. This seems simplictic than tarzan

  • @shivambajaj568
    @shivambajaj568 4 ปีที่แล้ว

    Amazing explanation of the intution behind the algorithm.

  • @rajkamal2120
    @rajkamal2120 8 ปีที่แล้ว

    Very well explained Tushar. Especially the "intuition" part.

  • @radekcrlik5060
    @radekcrlik5060 8 ปีที่แล้ว

    That was great! Crystal clear explanation, thanks

  • @Robbebeest
    @Robbebeest 6 ปีที่แล้ว

    What an amazing explanation. Thank you very much!

  • @ShisuiElric50
    @ShisuiElric50 4 ปีที่แล้ว +1

    Bro omg thank you, I implemented the entire in python from Wikipedia, but it was missing some details. You outlined everything I needed, now onto Johnson's alg

  • @sumitkumar-ld5vh
    @sumitkumar-ld5vh 4 ปีที่แล้ว

    That was a great explanation and the idea behind why the algorithm works is best 👌👍👍

  • @aravindbalakrishnan5534
    @aravindbalakrishnan5534 8 ปีที่แล้ว

    nicely done. well prepared, clear, and easy to follow. kudos

  • @chandrashekhar9470
    @chandrashekhar9470 4 ปีที่แล้ว +2

    Thanks for such a detailed Explanation. Please upload some more videos on ML and AI , It will be quite helpful for all of us..Thanks

  • @rajiiiv123
    @rajiiiv123 7 ปีที่แล้ว +54

    At some point, the learning stops and the pain begins.

  • @Ran-ek2ki
    @Ran-ek2ki 8 ปีที่แล้ว

    Thanks a lot Tushar - u really save me lots of hours trying to figure out written stuff =]

  • @debrajray1585
    @debrajray1585 6 ปีที่แล้ว

    Awesome explanation Tushar! Thank you :)

  • @benchmarks1016
    @benchmarks1016 2 ปีที่แล้ว

    Dropping a comment bcoz I watched several videos but logically yrs makes the most sense and Im finally getting it right without contemplating which path to take

  • @KunalKumar-ex9gm
    @KunalKumar-ex9gm 4 ปีที่แล้ว

    Bhai bohot kadak padhaye Hain aap !!! Thank bro 🥰

  • @devgupta1217
    @devgupta1217 ปีที่แล้ว

    Best ever explanation on you tube till date

  • @yashjain1011
    @yashjain1011 2 ปีที่แล้ว

    Thank you so much for making this video. Finally understood the algo intuition

  • @GabrielSantosNicolau
    @GabrielSantosNicolau 3 ปีที่แล้ว

    Wow! Extremelly clear explanation. Thanks a lot

  • @panchoingham
    @panchoingham 7 ปีที่แล้ว

    Fantastic explanation. Congratulations!

  • @anon_bean1982
    @anon_bean1982 8 ปีที่แล้ว

    Very clear explanation Tushar!

  • @astroash
    @astroash 3 ปีที่แล้ว

    Good work Tushar! I just discovered you're from MNIT. Pleasant surprise!

  • @pranjalbansal8459
    @pranjalbansal8459 3 ปีที่แล้ว

    Intution Explanation is really awesome. Thanks

  • @guieguima
    @guieguima 6 ปีที่แล้ว

    Thank you very much, this was really helpful! Good job! :D

  • @marcelosantos5220
    @marcelosantos5220 5 ปีที่แล้ว

    thanks man, your class helped me a lot

  • @29ibrahimsayed95
    @29ibrahimsayed95 2 ปีที่แล้ว

    You are really good at teaching Tushar Thanks alot

  • @mj2068
    @mj2068 5 หลายเดือนก่อน

    fantastic video, i like the meticulous style of your explanation.

  • @dmurty1
    @dmurty1 8 ปีที่แล้ว

    Oh man. You are something. Thanks for such simple explanation as usual.

    • @dmurty1
      @dmurty1 8 ปีที่แล้ว

      +Tushar Roy hey Tushar. I am preparing for interviews and ran into a question. This might be helpful for others too. Let's say someone asks me to write code related to strongly connected components or topological sort. Is it enough to write those two to four functions that deal with the actual implementation or should I write some prep code as a starting point. Unlike binary/tertiary trees, graph representation is not unique. Say you may be representing a weighted DAG using lists and I may be using arrays (being lazy!!!). Moreover I never faced any graph related problems in a limited number of interviews I attended and so this confusion. Please comment based on your actual interview experience. Thanks..

  • @mattmueller
    @mattmueller 6 ปีที่แล้ว

    just what I needed - thanks bud!

  • @anirudhatalmale5575
    @anirudhatalmale5575 4 ปีที่แล้ว

    The explanation of the proof why this algorithm works is super awesome.

  • @dariopavlovic8640
    @dariopavlovic8640 3 ปีที่แล้ว

    Awesome explanation, thank you!

  • @garimasingh7031
    @garimasingh7031 4 ปีที่แล้ว

    very very nice explanation and the justification is what was needed..thanku

  • @theinsanify7802
    @theinsanify7802 5 ปีที่แล้ว

    absolutely perfect explanation!

  • @samarthgupta4069
    @samarthgupta4069 3 ปีที่แล้ว

    Thank you so much for such a nice explanation!!!!

  • @debabhishek
    @debabhishek 8 ปีที่แล้ว

    great explanation. like all other videos.. what I liked in this video specially the way you explained why this algorithm works.. when I dry run is over.. I was thinking.. lets think how it will work and why it will work.. and this explanation was just there after that..

  • @yuktykhandelia5312
    @yuktykhandelia5312 3 ปีที่แล้ว

    Thanks for explaining the intuition.

  • @sheetalshireen
    @sheetalshireen 8 ปีที่แล้ว

    Hats off to you.. Thanks for such a nice explanation..

  • @SagarKumar-jz1wq
    @SagarKumar-jz1wq 7 ปีที่แล้ว

    Thanks Sir, For such a great explanation.

  • @hoaiphamuc9063
    @hoaiphamuc9063 7 ปีที่แล้ว

    Very good explaination, thank you Roy

  • @StanislavKozlovsk
    @StanislavKozlovsk 7 ปีที่แล้ว +2

    You are the best man

  • @rajatmishra9993
    @rajatmishra9993 9 ปีที่แล้ว

    Awesome work......Lot of thanks to you for posting this. Please post videos on Treaps and LCA.

  • @timgoppelsroeder121
    @timgoppelsroeder121 4 ปีที่แล้ว

    Great work great explanation

  • @Sparklegoat11
    @Sparklegoat11 7 ปีที่แล้ว

    Nice Video, very simple easily instruction of a complex problem

  • @saurabhjha8733
    @saurabhjha8733 ปีที่แล้ว

    explained the khode very beautifully ...

  • @nishijain7008
    @nishijain7008 4 ปีที่แล้ว

    Thank you. Very nicely explained.

  • @TheFrozenHeart5794
    @TheFrozenHeart5794 8 ปีที่แล้ว

    very detailed and clear explanation,thank you.

  • @fcristini
    @fcristini 8 ปีที่แล้ว

    Clearly explained, thank you so much

  • @giteshkhanna2633
    @giteshkhanna2633 6 ปีที่แล้ว

    Amazing intuition provided!

  • @poojapal2427
    @poojapal2427 8 ปีที่แล้ว

    Thank you so much Tushar.. This really going to help me a lot in my externals.. :)

  • @sureshchandra7754
    @sureshchandra7754 9 ปีที่แล้ว

    Thank a lot..exactly what I was looking for :)

  • @krithsjeenu3330
    @krithsjeenu3330 7 ปีที่แล้ว

    awesome explanation!! Thank you so much

  • @RohithMusic
    @RohithMusic ปีที่แล้ว

    Fantastic intuition!

  • @vanessa.mercea
    @vanessa.mercea 8 ปีที่แล้ว +1

    Very useful, thank you. :)

  • @MrPriti999
    @MrPriti999 4 ปีที่แล้ว

    amazing explanation. Thank you for this video

  • @bluesa9408
    @bluesa9408 5 ปีที่แล้ว

    Wonderful!!! you helped me a lot, thanks!!!

  • @shashwatdalakoti1644
    @shashwatdalakoti1644 2 ปีที่แล้ว

    Amazing explanation !!

  •  4 ปีที่แล้ว

    I finally understand why we reverse the graph!

  • @kislaya7239
    @kislaya7239 5 ปีที่แล้ว

    Thanks a lot for great explanation.

  • @zachb8012
    @zachb8012 7 ปีที่แล้ว

    Great explanation, thanks buddy!

  • @sanmaro91
    @sanmaro91 5 ปีที่แล้ว

    thank you what a high quality works

  • @maxjappert
    @maxjappert 4 ปีที่แล้ว

    Really well explained, thanks!

  • @marleyca3795
    @marleyca3795 8 ปีที่แล้ว

    This is so helpful, thanks!!

  • @bhupalchiranjeevi5049
    @bhupalchiranjeevi5049 8 ปีที่แล้ว

    very nice explanation ... Really helpful tushar

  • @himanshukandwal5373
    @himanshukandwal5373 8 ปีที่แล้ว

    Very well Explained ! Thank you :)

  • @maneeshkumarpatel9874
    @maneeshkumarpatel9874 4 ปีที่แล้ว +1

    thank you so much sir...
    Really awesome explanation.

  • @mdmorsalin5023
    @mdmorsalin5023 3 ปีที่แล้ว

    very understandable explanation. Thank you sir.

  • @tanmaiysethia176
    @tanmaiysethia176 3 ปีที่แล้ว

    what a wonderful explanation

  • @pavanbhavirisetty6458
    @pavanbhavirisetty6458 7 ปีที่แล้ว

    nice explanation especially why the algorithm works

  • @aliasgar1648
    @aliasgar1648 7 ปีที่แล้ว

    Awesome explanation !!

  • @rapid1010
    @rapid1010 5 ปีที่แล้ว

    surprisingly a good explanation.thanks!

  • @nitesh4146
    @nitesh4146 6 ปีที่แล้ว

    Great explanation! Thank you so much!!

  • @andywang4189
    @andywang4189 4 ปีที่แล้ว

    Wonderful explanation, subscribed

  • @rituagrawal2218
    @rituagrawal2218 7 ปีที่แล้ว

    Very well explained. Thanks

  • @prateeksahni2923
    @prateeksahni2923 7 ปีที่แล้ว

    Keep up the good work!