Kosaraju's Algorithm - Strongly Connected Components | GeeksforGeeks

Поділитися
Вставка
  • Опубліковано 28 жов 2024

КОМЕНТАРІ • 98

  • @teslaonly2136
    @teslaonly2136 4 роки тому +139

    Who watches this video after ' Google coding interview with a High School Student' ?

  • @bassamhalabiya2895
    @bassamhalabiya2895 6 років тому +118

    Great explanation but really hate the audio output. It's got a lot of static and it kinda hurts to be honest but still thank you

    • @damercadoo
      @damercadoo 4 роки тому

      Bassam Halabiya with that you find a magical order. In that order you should find the SCCs

  • @junzhengca
    @junzhengca 5 років тому +31

    Amazing video, clear and concise.
    The only issue: why the audio is only on one side, my ear is bleeding.

    • @avu72
      @avu72 4 роки тому

      hahahaa, exactly

    • @98_shubhamsinha15
      @98_shubhamsinha15 4 роки тому

      Hear it without using earphones🙂

    • @AMAR-pc6ht
      @AMAR-pc6ht Рік тому

      Hoping you got your doctor's appointment on time :P

  • @arunachalamm3399
    @arunachalamm3399 2 роки тому +4

    this came in my exam today, thanks to ur brilliant explanation i was able to complete it quickly bro.. keep up the amazing work 🔥

  • @SANGARSSAIBHARADWAJ
    @SANGARSSAIBHARADWAJ 11 місяців тому

    Out of all videos I saw on YT this the best and the shortest one lol...Thanks

  • @joel_b
    @joel_b Рік тому

    The example walkthrough here is just what I needed. Excellent work. Only thing to note is that all the audio was in the right channel

  • @singularity3724
    @singularity3724 Рік тому

    Just implemented this after listening to your explanation. Very clear and useful!

  • @VedsAdda
    @VedsAdda 6 років тому +8

    Great video and very nice trace of series of steps applied in Kosaraju's Algorithm. I was reading about it in a text book and I couldn't understand the algorithm completely until I saw this video! thanks a lot.

  • @sanakhanam4952
    @sanakhanam4952 5 років тому +6

    Best explanation on the topic till date !!

  • @talstol6009
    @talstol6009 6 років тому +1

    This video + subtitles = amazing.

  • @za9haterhmmm
    @za9haterhmmm 4 місяці тому

    my right ear really enjoyed this video

  • @Av-cu6gm
    @Av-cu6gm 4 роки тому +3

    What is the benifit of involving finish time in this concept?
    Does that helped in idea generation?
    It willd be helpful, if answered this..

    • @subhambasuroychowdhury9698
      @subhambasuroychowdhury9698 4 роки тому

      When we visit a vertex for the 1st time we get the start time of that vertex. But when we get the finish time of a vertex it means that all the edges have been visited. Only then we push a vertex into the stack. I hope this helps. For more clarification pls go through the vide again!!

    • @avu72
      @avu72 4 роки тому +1

      aise hi, sexy lag raha tha!

  • @jingweiwang3157
    @jingweiwang3157 5 років тому

    Great video, just don't listen using headphones. It will pierce your ears and crack your head.

  • @ayushjain7714
    @ayushjain7714 7 років тому +6

    Wait! filling order function follows same algo as Topological sorting!

  • @mosshead_vinsmoke
    @mosshead_vinsmoke Місяць тому

    thnaks exam is in 20 minutes and i jsut understood the concept

  • @mansoormohmand5852
    @mansoormohmand5852 6 років тому +3

    It was very helpful, thanks for sharing such kind of lectures.

  • @kevinscott9013
    @kevinscott9013 2 роки тому

    You switched a long of the directions when explaining strongly connected components?

  • @ankit_s
    @ankit_s Рік тому

    great explanation brother

  • @PratikShah123
    @PratikShah123 4 роки тому +2

    Nice, But what is the significance of keeping track of finish time in this algorithm ?

    • @SirBearingtonSupporter
      @SirBearingtonSupporter 3 роки тому

      The number of jumps is important to keep track of to know how costly the path of. Think about it as asking for directions from A to X. And not everything has to have a timing of 1 to it, vert AB could take 1 but AD could take 2.
      Keeping track of the visited nodes would be important from preventing backtracking. So in that previous example, we see that AB is cheap but BD might not exists and BC to BD will end up costing more than AD (2).
      That's why we keep track of both visited and the finish time.
      We give a timing value of n to the stack and then n+1 to the next node because the value of any vertex XY will always be assumed to be greater than 0. This allows us to map the graph in a map object / function AND in the event we are looking for some specific node within a "good enough" timing, we can traverse and do the work that much sooner instead of spending eons looking for the absolute best.

  • @Jarvo98
    @Jarvo98 4 роки тому +2

    Thanks a lot, you saved me for my algorithms and data structures course :D

  • @jaatharsh
    @jaatharsh 4 роки тому +1

    useful as always, thanks Team GFG

  • @LokeshKumar-os6ux
    @LokeshKumar-os6ux 6 років тому +1

    what is the difference bw filling order function and topological sorting?

  • @jvcss
    @jvcss 2 роки тому

    awesome explanation

  • @ysosrdude
    @ysosrdude 2 роки тому

    My right ear understood the whole concept

  • @radhasingh3549
    @radhasingh3549 2 роки тому +1

    Gfg is really a great platform to learn!😊

  • @ayushjain7714
    @ayushjain7714 7 років тому +1

    Really Awesome Explaination.

  • @bite091_jamee7
    @bite091_jamee7 Рік тому

    nice explanation

  • @ren5124
    @ren5124 Рік тому

    Is there a reason why we reverse the graph?

  • @kautukraj
    @kautukraj 4 роки тому +2

    Very helpful!

  • @MritunjayKumar-rd2es
    @MritunjayKumar-rd2es 11 місяців тому

    my right ear completely understood , it well explain to my left ear

  • @rahulchaubey8988
    @rahulchaubey8988 4 роки тому

    Great explaination...

  • @harshitjain7060
    @harshitjain7060 6 років тому +1

    great explaination...I really liked it!!!

  • @farooqarshad9955
    @farooqarshad9955 4 роки тому

    Fill Order function seems to be topological sorting rather then DFS

  • @azadalishah2966
    @azadalishah2966 5 років тому

    At 9:00 you say 2nd DFS function doesn’t compute finish time unlike first DFS function fillOrder(), but I don’t see computing finish time in fillOrder(), can u pls explain?

    • @albumlist1
      @albumlist1 5 років тому +1

      pushing it to the stack is done in the order of the finishing time . Essentially , top of the stack represents the node with maximum finishing time

    • @azadalishah2966
      @azadalishah2966 5 років тому

      Shabnam Banu, Thanks, I got ur point but its understood one. In that case we can say reverse for 2nd function i.e. stack is popped in order of time again. I believe In this algorithm mentioning “time” is unnecessary and misleading. There is no role of time in this algo but stack is filled once a node & it’s all neighbours are visited. Otherwise, we are “linking” time & stack in “every” algorithm where stack is used (that pops up another question if the same solution is achieved by same algorithm but without using stack but some other data structure, in many cases we use stack for convenience, but not mandatory). Mentioning time makes it feel like explicit time computation is mandatory.

  • @HimanshuSingh-ob9qo
    @HimanshuSingh-ob9qo 4 роки тому

    Nice explanation

  • @davidlieber3494
    @davidlieber3494 2 роки тому

    Thanks man, great explanation

  • @lalitverma5248
    @lalitverma5248 6 років тому

    not able to distinguish DFS, is this really DFS as the order of nodes visited in DFS are different from this.

  • @marco.nascimento
    @marco.nascimento 4 роки тому +1

    Awesome explanation, totally saved me

  • @bhumikagupta1268
    @bhumikagupta1268 5 років тому +1

    Hey! That was an amazing explanation.. Thanks alott! :D

  • @harshitkhandelwal5506
    @harshitkhandelwal5506 7 років тому +3

    very nice explanation

  • @mariamira5425
    @mariamira5425 Рік тому

    Thank you so much

  • @edwardbarker8949
    @edwardbarker8949 5 років тому +1

    Great tutorial thank you

  • @MeetSinojia7
    @MeetSinojia7 7 років тому +1

    Great explanation!

  • @just_relax3110
    @just_relax3110 4 роки тому

    Excellent

  • @adilaslammirmohammadaslamm9762
    @adilaslammirmohammadaslamm9762 4 роки тому

    Great. I like it very much.

  • @mikikaboom9084
    @mikikaboom9084 2 роки тому

    Thank you

  • @saurabhdubey4283
    @saurabhdubey4283 6 років тому +1

    Can I get this code in c

  • @francisdrake7000
    @francisdrake7000 3 роки тому

    thank you sir!

  • @apporvaarya
    @apporvaarya 4 роки тому

    İ didn't get it

  • @hellonishant
    @hellonishant 7 років тому +1

    well explained.
    Thank You. :)

  • @manishdas6525
    @manishdas6525 6 років тому

    nice and informative

  • @thefrontendfiend
    @thefrontendfiend 5 років тому

    Indian squad representing.

  • @chinmay6144
    @chinmay6144 6 років тому

    Dhanyawad

  • @haneulkim4902
    @haneulkim4902 4 роки тому

    I thought graph is strongly connected if vertices points to each other. so 0 -> 1 and 1 -> 0. No?

  • @angelkodjaivanov6739
    @angelkodjaivanov6739 Рік тому

    cool vid indian man

  • @rodrigueroland
    @rodrigueroland 4 місяці тому

    You forgot to delete your memory

  • @DylanPatel-yo2yu
    @DylanPatel-yo2yu 8 місяців тому

    your code aint working for my 5 million lines of vertices

  • @apporvaarya
    @apporvaarya 4 роки тому

    Got it finally with ex

  • @EngineersLife-Vlog
    @EngineersLife-Vlog 7 років тому

    where is the path between (0,2) in first graph...... a graph is said to be strongly connected if every vertex is reachable from every other vertex.
    not for path between every pair of virtex

    • @utsavrohilla4690
      @utsavrohilla4690 7 років тому +4

      Saying that every vertex is reachable from every other vertices is same as saying that there is a path between every pair of vertices. Your claim does not actually make sense. Reachabilty in graphs is always acquired through a path.
      The path between (0,2) is 0->1->2.

    • @santhoshcts5
      @santhoshcts5 7 років тому +1

      When we say reachable , it doesn't mean to be having direct connection . there can be any "n" number of vertices between them but still it should be able to reach in a Directed graph . hope this helps

    • @EngineersLife-Vlog
      @EngineersLife-Vlog 7 років тому +1

      thanks

    • @ayushjain7714
      @ayushjain7714 7 років тому

      You should better learn the defination of "path" first

  • @anmolkahlon584
    @anmolkahlon584 4 роки тому

    nice

  • @sachinnegi7188
    @sachinnegi7188 5 років тому

    I don't know why he is rushing with the explanation

    • @blindprogrammer
      @blindprogrammer 5 років тому +1

      To keep the length short of the video. and it's a good idea!!

  • @greennature4639
    @greennature4639 4 роки тому

    👍🏻

  • @azadalishah2966
    @azadalishah2966 5 років тому

    Very well explained but your class is very poorly designed. You should never fix number of vertex (as you pass 5 here) statically. It’s shud be increasable during run time dynamically. Moreover, did you even compile your code? How do you access *adj with class obj when it’s private member?
    Pls make your class standard one, which can grow dynamically by using some proper data structure.

  • @eneshkaneshk380
    @eneshkaneshk380 Рік тому

    Thnku mam.., sry., sir😅

  • @petrjandal5197
    @petrjandal5197 10 місяців тому

    Please talk slowly😪

  • @arijitpanda7321
    @arijitpanda7321 4 роки тому

    Great explanation

  • @rajarshibasu007
    @rajarshibasu007 4 роки тому

    Nicely explained

  • @shalombentenzingnamchyo9384
    @shalombentenzingnamchyo9384 3 роки тому

    Thank you