Question 71
HardAn AVL tree receives the keys 10, then 30, then 20. Which rebalancing is needed after the last insertion, and what becomes the root?
- A.
A single left rotation; the root becomes 30
- B.
A single right rotation; the root stays 10
- C.
No rotation is needed
- D.
A right-left (double) rotation; the root becomes 20
Sign up free to see the answer and a step-by-step explanation.