0
Tree Height
0
Node Count
0
Root Balance
None
Current Rotation
Ready
Status
Step Timeline
Operations
Balanced node (height shown above BF)
Deleted / unstable node focus
Inserted or selected node
Rotation path highlight
RL/LR secondary rotation
How It Works
AVL trees maintain a balance factor on every node: height(left) - height(right). After each insertion or deletion, the tree updates heights bottom-up and performs one of four rotations if a node becomes unbalanced.
- LL: right-rotate the heavy subtree.
- RR: left-rotate the heavy subtree.
- LR: rotate left on the left child, then right on the node.
- RL: rotate right on the right child, then left on the node.
- The timeline on the right stores every step so you can replay, pause, or step through operations manually.