In an AVL tree, what is the maximum allowed difference in height between the left and right subtrees of any node?
Show answer
One
AVL trees are strict height-balanced binary search trees. If a modification causes the height difference (the balance factor) to exceed one, rotations are performed to rebalance the tree and maintain O(log n) performance.
Also asked as:
- What is the maximum balance factor (height difference) allowed for any node in an AVL tree before it requires rebalancing?