- AVL trees are binary search trees where the balance factor of every node is between -1 and 1, ensuring the tree remains balanced during insertions and deletions.
- When a node becomes unbalanced with a balance factor of 2 or -1 after an insertion or deletion, rotations are performed to balance the tree. Single rotations are LL or RR, double rotations are LR or RL.
- Rotations may involve the parent node (LL, RR), the grandparent node (LR, RL), or both (LR is a RR followed by a LL rotation).
- Rebalancing after deletions uses the same classification (L, R0, R1, R-1) and rotation techniques as insertions to