AVL tree insertion

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

AVL tree source code:

My website:

Рекомендации по теме
Комментарии
Автор

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

basix
Автор

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

akhilrajnambiar
Автор

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.

adnansamivlogs
Автор

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

phanthanhchung
Автор

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

arkadyzelensky
Автор

this is the best DS tutorials hands down!

ghostfjdgcsusvsgsj
Автор

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

nosakhareaghedo
Автор

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!

howardcheng
Автор

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

deepikasingh
Автор

You are much better than my professor.. Thanks!

ritaheejeong
Автор

Genius! Simplicity and effectiveness themselves! liked and subbed

kristijanceple
Автор

At 7:32, why is the condition to test if a rotation is "leftleft" or "leftright" node.left.bf <= 0? Shouldnt it be node.left.bf == -1? Can anyone give me an example where node.left.bf == 0 for a "leftleft" case?

bluejimmy
Автор

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

griffinmfalme
Автор

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

mohamedibrahimbehery
Автор

Very good explanations! Keep'em coming :)

FreakStyler
Автор

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.

NaveenKumar-osdv
Автор

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

typingcat
Автор

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

ahmedhussein
Автор

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

maxxxwan
Автор

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

osolomons