In an AVL tree, the balance factor of every node must lie in which range?
- A 0 to 1
- B -1 to +1
- C -2 to +2
- D 0 to 2
Explanation
An AVL tree is height-balanced: for every node the heights of its left and right subtrees differ by at most 1, so the balance factor is -1, 0 or +1.