AVL tree insertion

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

КОМЕНТАРІ • 32

  • @basix250
    @basix250 3 роки тому +21

    Your data structure videos are the best resources I've ever encountered. Thank you for awesome tutorials!

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

      +1. Clean concise code. Clear concise explanations. Thank you!

  • @nekitamo96
    @nekitamo96 21 день тому

    Best explanation for AVL tree on youtube!.

  • @akhilrajnambiar2080
    @akhilrajnambiar2080 3 роки тому +3

    This is by far the best explanation for AVL Trees pseudocode, I could find on the internet! Really awesome content.

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

    Amazing explanation! I wish my university professors could teach like you. Life would’ve been so much easier. Thank you so much for making these videos, it’s really helping me in my algorithms course.

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

    Your explanation is top-notch, I'm not even kidding.

  • @arkadyzelensky7655
    @arkadyzelensky7655 2 роки тому +2

    Thank you very much! You did amazing job!
    I watched others video and didn't understand AVL tree, but yours did the trick :)

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

    this is the best DS tutorials hands down!

  • @howardcheng9293
    @howardcheng9293 5 років тому +3

    The best explanations I have ever searched, thanks a lot ^_^
    Your tree rotation video is awesome and easy to understand too, very helpful for me!

  • @nosakhareaghedo5692
    @nosakhareaghedo5692 2 роки тому +3

    if you write this code exactly, your balance function might not work. to fix that, add an update function in the insert function for the node as soon as you create it before returning. This is very important as the height and bf of the subsequent subtrees depend on the leaf nodes

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

    Amazing explanation. The breakdown of what's happening makes it look so simple. Thanks :)

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

    Genius! Simplicity and effectiveness themselves! liked and subbed

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

    ​ @WilliamFiset Man you are a amazing. hero! Superman!

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

    You are much better than my professor.. Thanks!

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

    Man you're being awesome! Thanks for that... Keep that up! :)

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

    Very good explanations! Keep'em coming :)

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

    These are amazing thank you!

  • @typingcat
    @typingcat 3 роки тому +1

    The connecting lines of the trees need to be thicker. They are almost invisible.

  • @bluejimmy168
    @bluejimmy168 2 роки тому +3

    At 7:32, why is the condition to test if a rotation is "leftleft" or "leftright" node.left.bf

  • @NaveenKumar-os8dv
    @NaveenKumar-os8dv 2 роки тому

    Looking at the comments, I think I am just dumb for not understanding it. I don't understand the part after the rotation. When rotation is done, and we have new root at the top, how do we connect to the parent? how does it happen, don't skip that part please. because parent still has reference to the rotated node.

  • @RobinHistoryMystery
    @RobinHistoryMystery 8 місяців тому

    dayuym, this some crazy shi , thanks

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

    Is the code examples in C+?

  • @ahmedhussein6359
    @ahmedhussein6359 Рік тому +1

    7:11 wrong code...please edit video....

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

    After rotating, the balanced factor of the root node is 0(+1) for the left-left case. Why including +1? Thanks

    • @WilliamFiset-videos
      @WilliamFiset-videos  6 років тому

      Lifeng W I'm pretty sure the reason is that the immediate left node before rotation might have a right child. When the rotation happens that node appears on the other side resulting in a +1.

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

      The immediate left node(4) before rotation has right child(C), but C is already in the balanced tree whose bf is 0. Right?

    • @WilliamFiset-videos
      @WilliamFiset-videos  6 років тому +1

      We're talking about the same node. However, a node is considered 'balanced' if its balance factor is -1, 0 or +1. The only time we have to rebalance a node is when the BF is either +2 or -2. This is why after the rotation the balance factor of the root is allowed to be 0 or +1 in a left -left a rotation.

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

    You r awesome 😎

  • @osolomons
    @osolomons 6 років тому +12

    5:23 "pseudo-code" == almost python

  • @georgen.d8557
    @georgen.d8557 8 місяців тому

    the most unseful youtube video on youtube dislike because the tree is on balans already