Bek
Bek

Reputation: 45

AVL tree rotation example clarification

Now, I am learning AVL tree data structure from a book and here's one example which I have a difficulty to understand:

AVL tree rotation case

Can anyone explain the process of rotation here?

Upvotes: 0

Views: 2009

Answers (1)

Nachiket Kate
Nachiket Kate

Reputation: 8571

I am not sure about your example but I think it is wrong AVL tree is height balanced binary search tree (which is not in your example, AUG should be inserted on right hand side of MAY not left) anyways in AVL tree LR rotation with an example could be like this,

enter image description here

for good animation you can see , enter image description here

Upvotes: 1

Related Questions