A binary search tree with N integers may have height ______ in the best case, and ______ in the worst case.
Show answerHide answer
Correct answer: (D) O(log₂N), N−1
Explanation
A balanced BST has height O(log₂N). If keys are inserted in sorted order the tree becomes a chain with height N−1.