Minimum Spanning Tree #1: Kruskal Algorithm

Поделиться
HTML-код
  • Опубликовано: 19 дек 2024

Комментарии •

  • @eliteXranger
    @eliteXranger 11 лет назад +9

    thank you, i understand both kruskal and prim algorithm now, my lecturer just use lots of mathematical notations to explain it and it barely makes sense but your visualisation and explanation helped, i understood it straight aware, am so prepared for this exam now

  • @FitCoder
    @FitCoder 4 года назад +2

    Explained in a very simple manner.

  • @imrulz1
    @imrulz1 5 лет назад +2

    unparalleled explanation. thank you for walking through the psuedo code as well!!

  • @vivekpal1004
    @vivekpal1004 8 лет назад +1

    All your videos are concise and clear. Thanks so much for your work!

  • @Abdullah-mg5zl
    @Abdullah-mg5zl 10 лет назад +21

    Great video man, you're a solid programmer!

  • @chengu8922
    @chengu8922 5 лет назад

    You english and illustration are so good!

  • @MuchKnowledge
    @MuchKnowledge 10 лет назад +1

    Simple and straightforward. Very helpful, thanks so much!

  • @jesuslinaresrodriguez5903
    @jesuslinaresrodriguez5903 3 года назад +1

    I don't understand I used the code in the page and it didn't work, what do I have to add, the libraries?

  • @prajwalpatil489
    @prajwalpatil489 5 лет назад +1

    You are Awesome Bro🔥🔥

  • @Bakugantsuvai1
    @Bakugantsuvai1 9 лет назад

    Nice video, I like how you include the implementation.

  • @miriyalajeevankumar5449
    @miriyalajeevankumar5449 7 лет назад

    thanks a lot ... you are a great teacher.
    We are greatful to you.

  • @TheScubaDiverDan
    @TheScubaDiverDan 10 лет назад

    Very helpful demonstration, thanks a lot!

  • @rycemuffin
    @rycemuffin 8 лет назад

    Bo Qian my man thank you for the HD video that makes my eyes oh so happy and infusing me with the MST * fist bump *

  • @SnaKiiBall
    @SnaKiiBall 9 лет назад +1

    The "minimum spanning she" will haunt me for the rest of my life

  • @pgkeerthi
    @pgkeerthi 8 лет назад

    thanks for including the codes and explaining!

  • @prajaktasalunke8380
    @prajaktasalunke8380 9 лет назад +3

    thanx for such a great demo...

  • @PROcrastiDRIVESVofficial
    @PROcrastiDRIVESVofficial 8 лет назад +1

    Your videos are awesome, cheers mate!

  • @JakeKemple
    @JakeKemple 10 лет назад

    Thank you so much, very well put together!

  • @thorthegreat10
    @thorthegreat10 5 лет назад

    would it be reasonable to break from the loop when the list of MST edges will be V - 1 in size? Idea is that we'll need V - 1 edges to connect V vertexes, and we get those edges in a greedy manner. In the video the loop is executed for every single edge.

  • @lavienguyen8768
    @lavienguyen8768 7 лет назад

    Thank you so much. It is very helpful.

  • @abhinav.t1602
    @abhinav.t1602 8 лет назад +1

    What if we remove the RANK think from this program? Will it make any difference in the output?

    • @SunilKumarc682
      @SunilKumarc682 8 лет назад

      I had the exact same question.

    • @swellbot5738
      @swellbot5738 7 лет назад +1

      It depends on how fast you want the implementation to be. The addition of rank adds an optimisation to this algorithm when you do the union of two sets. The RANK is actually just the depth of that node.
      If we have a set, the larger the depth of a set, the longer the Find(x) method will take because it needs to recursively keep going up to its root node right? So if we do the union of two sets and add a long set to a shorter one we've increased the overall depth of the new union of that tree by 1 right? Therefore, complexity is getting worse.
      However, if when we combine sets together with the union, we check whether x's depth is less than y, we know that x is a shorter set than y so we should assign x root's parent to y's root so thus we have added a shorter set to a longer set. As a result we do not increase the depth of the resultant union set and do not worsen complexity.
      Hope this made sense

  • @sagarjain4128
    @sagarjain4128 2 года назад

    kindly someone tell how to figure out the time complexity of prims and kruskal algo

  • @ЮліяГрабар-м4г
    @ЮліяГрабар-м4г 7 лет назад

    Amazing, thank you a lot for explanation!

  • @giaphatha88
    @giaphatha88 9 лет назад

    you saved me!!! I was struggling for days!!

  • @rickall
    @rickall 9 лет назад +17

    great work ..thanks :)
    will be "Looting" for you,, :P

  • @TienNguyen-jk6ww
    @TienNguyen-jk6ww 10 лет назад

    I still not understand code "(t, t + sizeof(t) / sizeof (t[0]) )" means, any idea ?

    • @GameCrafter467
      @GameCrafter467 10 лет назад +1

      In that line he use the constructor of vector which takes 2 iterator(t is iterator to begining of array and t + sizeof(t) / sizeof (t[0]) is end of array)

    • @TienNguyen-jk6ww
      @TienNguyen-jk6ww 10 лет назад

      tks for your comment :D

  • @subhroneelmoitra1895
    @subhroneelmoitra1895 7 лет назад

    I notice a lot of advanced material in your code. For eg, the use of 'vector' (which I in my limited knowledge am assuming to be a template of some sort) also in your disjoint set video the use of hash table was a bit beyond my comparison. Is there any book or material I can refer to to extend my knowledge of C++ ?
    Thanks in advance.

    • @toby.2a
      @toby.2a 7 лет назад

      Hey, sorry for late reply, but a vector is part of C++'s standard template library, or STL. Vectors in C++ work much like the arrays you know from other languages, but are not fixed in size, and have some special functions you can use. You can read more about it here: www.cplusplus.com/reference/vector/vector/

  • @tuotuoriver
    @tuotuoriver 5 лет назад +2

    感谢大神的讲解

  • @mayukhmayukh
    @mayukhmayukh 10 лет назад

    Thanks for the video. It was crisp. How may I find the slides?

  • @tjizzle1027
    @tjizzle1027 7 лет назад

    Can i get a link for the program you are using to do the nodes and graphs in this video? or i can realize that it's a freaking powerpoint and im slow as shit... LOL great vid btw

  • @FabianCalsina
    @FabianCalsina 11 лет назад +2

    Incredible video... Thanks

  • @deshinador
    @deshinador 7 лет назад

    Thanks mate. Great videos!

  • @codaq4043
    @codaq4043 2 года назад

    Best explanation

  • @abocidejofa9686
    @abocidejofa9686 10 лет назад

    You are amazingly good. I wish you could post programming interview problems:
    edit distance, knapsack problem, permutation of a string, combination, kth smallest element, longest palindromic substring, shortest path, ... Thanks in advance.

  • @tripsters10
    @tripsters10 9 лет назад

    does this use path compression?

  • @shwetadsa
    @shwetadsa 7 лет назад

    what does the find function do?

    • @swellbot5738
      @swellbot5738 7 лет назад +1

      find(x) finds the root node of that set.
      So if you pass in 'K' which is a member of a set, it will recursively look at it's parent until it's parent is itself and thus must be the root node and returns that value.

  • @ashwinkadaru
    @ashwinkadaru 6 лет назад

    Clear and concise thanks!

  • @yaboy5515
    @yaboy5515 7 лет назад

    does this work? like if you ran it?

  • @lozada12100
    @lozada12100 11 лет назад

    Can this be used to Find The Maximum Spanning Tree? Can the code be altered and then find the maximum spanning tree?

    • @Drigger95
      @Drigger95 10 лет назад +1

      ya just sort it based on greatest to least and not least to greatest as he does

  • @memorablename5187
    @memorablename5187 8 лет назад +1

    is MCST same as MST

    • @perspective500
      @perspective500 8 лет назад +1

      +Raymond Berry ya if you mean minimum cost spanning tree

  • @bewallyt
    @bewallyt 11 лет назад

    Great video; however, your Union function is not correct.
    The Union should match the leader of one point (via the find function) to the other point. It's irrelevant as to which point should be the "main" leader.

  • @fabihatabassum5838
    @fabihatabassum5838 8 лет назад

    brilliant !! and off course thanks a lot. :)

  • @iriyakun
    @iriyakun 6 лет назад

    great lecture! thanx

  • @JigxorGames
    @JigxorGames 11 лет назад

    Thank you very much. This was very helpful!

  • @vanlexgomesgaldino6416
    @vanlexgomesgaldino6416 8 лет назад

    Congratulations boy. Thanks.
    Language is C or C++?

  • @calvinchankf
    @calvinchankf 5 лет назад +1

    your video saved my day 👍🏻btw it would be nice if u post your code/collections on github as well

  • @ChaturakaGunatilaka
    @ChaturakaGunatilaka 11 лет назад

    Awesome Geek!!!
    Thank you

  • @ahamedrafy5019
    @ahamedrafy5019 6 лет назад

    can you give me this source
    code???

  • @Loukas_Anastasiadis
    @Loukas_Anastasiadis 7 лет назад

    you are the boss..thanks a lot

  • @ramjan135
    @ramjan135 8 лет назад +3

    please help us with c language also.

  • @vasylarsenii4800
    @vasylarsenii4800 5 лет назад

    thank you so much, man!

  • @tashfiq92
    @tashfiq92 10 лет назад

    very helpful, thank you :)

  • @michaelstewart95
    @michaelstewart95 8 лет назад +28

    Thanks a 'loot' ;)

  • @UCHS_CH
    @UCHS_CH 5 лет назад

    U should tell the dis joint set in this vdoe also

  • @joe00spacchime
    @joe00spacchime 6 лет назад

    the code does not work

  • @ShuyanStoryTeller
    @ShuyanStoryTeller 7 лет назад

    Thank you so much.

  • @StayBased_
    @StayBased_ 7 лет назад +2

    showing an algorithm and demonstrating some code with it too? what is this magic?

  • @simonetruglia
    @simonetruglia 8 лет назад

    Thank you so much :)

  • @bishnunath5699
    @bishnunath5699 5 лет назад

    thanks a lot man

  • @efrengaribaldi8813
    @efrengaribaldi8813 6 лет назад

    4:14

  • @geesalem5559
    @geesalem5559 7 лет назад

    change the speed to 1.25

  • @unaisnohi
    @unaisnohi 10 лет назад +1

    it helps a lot

  • @sakibrumi4328
    @sakibrumi4328 7 лет назад +2

    Need the source code link that you are using in this vedio

  • @shaulrosenberg7249
    @shaulrosenberg7249 8 лет назад

    excellent

  • @prakashdeep8290
    @prakashdeep8290 10 лет назад

    thanx for ths video

  • @ABMHosneeMobashir
    @ABMHosneeMobashir 8 лет назад

    Thanks man :)

  • @oecalaw
    @oecalaw 5 лет назад

    thanks

  • @harshitruhela9492
    @harshitruhela9492 7 лет назад

    Thanks sir

  • @darshanapandya9241
    @darshanapandya9241 9 лет назад

    NICE

  • @saxena3718
    @saxena3718 8 лет назад

    "loot"

  • @Amanat722
    @Amanat722 7 лет назад

  • @mbdesign8118
    @mbdesign8118 7 лет назад

    the first part is very bad explained

  • @cgpir
    @cgpir 10 лет назад

    Thank you, this was very helpful!

  • @Kartalizm1903
    @Kartalizm1903 7 лет назад

    Thank you very much!

  • @OyaUna
    @OyaUna 6 лет назад

    Thank you very much :)