

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The four types of imbalance that can occur in an avl tree and the corresponding rotations needed to rebalance the tree. The document references mark allen weiss's 'data structures & algorithm analysis in c++' and sartaj sahni's 'data structures, algorithms, and applications in java'.
Typology: Study notes
1 / 2
This page cannot be seen from the preview
Don't miss anything!
1 I. Left subtree has a height two greater than the right subtree, and at the left child, the two subtrees are of equal height or the left subtree has a height one greater than the right. A single right rotation at the point of violation will suffice. Sahni: LL type imbalance II. Left subtree has a height two greater than the right subtree, and at the left child, the right subtree has a height one greater than the left. There must be a set-up rotation at the left child to the left. After that is the rightward rotation at the point of violation. Sahni: LR type imbalance III. Right subtree has a height two greater than the left subtree, and at the right child, the left subtree has a height one greater than the right. There must be a set-up rotation at the right child to the right. After that is the leftward rotation at the point of violation. Sahni: RL type imbalance IV. Right subtree has a height two greater than the left subtree, and at the right child, the two subtrees are of equal height or the right subtree has a height one greater than the left. A single left rotation at the point of (^1) Mark Allen Weiss, Data Structures & Algorithm Analysis in C++ (2nd (^) edition; Addison-Wesley, 1999), pp. 145 ff. Sartaj Sahni, Data Structures, Algorithms, and Applications in Java (2nd edition, Silicon Press, 2005), pp. 607 ff. Printed on 2020-11-29 at 15:
violation will suffice. Sahni: RR type imbalance Printed on 2020-11-29 at 15: