I must admit. I leatned thid in University. But never went on to work in Comp Sci. 28 years later ive been looking for a video to simply remind me the logic of rotations. Only 6 mins in an its all come flooded back. Now. I have to just go and implement it in C and i will be a hapoy man.
At 2:21, I have bf=br-bl but I meant to say bl-br. Even though I wrote the formula wrong, you can see that all my calculations are bl-br. Sorry for the confusion!!
2:07 Why you write height in red first then when you try to determine BF, you wrote the height in blue and automatically minus 1 and said not to be confusing.
Great conceptual explanation. One thing, at around 2:47 the formula is right height minus left height, but the rest of the video seems to flip that order. Am I being dyslexic?
This is probably one of the most helpful videos I have ever watched. I struggled with diagramming these rotations for hours. I have a final on Friday and you just saved me!
in the deletion portion, why is the 2nd to last unbalanced tree, why does 2 have a balance factor of -2 instead of a positive 2 since it's on the left side?
Excellent video for explaining AVL trees in a quick and straightforward way! Only thing I would change in an updated version would be some more streamlined graphics/animations, and a new voiceover for the bf=h_L -h_R so as to not get anyone confused. Also, a quick explanation of why "Left-Right" and "Right-Left" rotations are called what they are would be nice. When we perform a "Left-Right" rotation on a node, it seems we are actually doing a right rotation on it's child, THEN a left rotation. Seems to be a bit of a misnomer in that way.