Show the worked solutionAn AVL tree keeps the heights of the two subtrees of every node within 1, so its height is always \(O(\lg n)\); rebalancing after insert or delete costs only \(O(\lg n)\) rotations.
An ordinary BST can degenerate into a chain (e.g. keys inserted in sorted order), with height \(n-1\).\[\text{Worst case}\quad \text{AVL: }O(\lg n),\qquad \text{BST: }O(n)\]for search, insert and delete alike, so AVL is better for all three.Answer: D
GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com