The balance rule bounds the height by about 1.44 log2(n+2), so every operation is O(log n) even for sorted input. It repairs imbalance after each insert or delete with rotations.
AVL tree
A binary search tree that keeps the heights of every node's two subtrees within 1 of each other using rotations.