I read that there are 4 types of rotations:
- Left rotation
- Right rotation
- Left-Right rotation
- Right-Left rotation
What are the corresponding abbreviations: RL,LR,RR,LL? Is there a reference how to rebalance AVL trees?
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It only takes a minute to sign up.Sign up to join this community
The common abbreviations for Left rotation, Right rotation, Left-Right rotation, Right-Left rotation are L, R, LR and RL respectively, as expected. These rotations can be applied to all kinds of binary search trees. For example, they are applicable to red-black trees, too.
Please note that there is minor confusion about the terminologies. However, I would say that more than 9 out of 10 times, you will encounter the mainstream terminologies as explained in that GeekForGeeks article.
A common reference to rebalance AVL trees is the Wikipedia entry on AVL trees.