Question 21
What is the expected search time in a height-balanced BST with n nodes?
A height-balanced BST has height Θ(log n).
What is the expected search time in a height-balanced BST with n nodes?
A height-balanced BST has height Θ(log n).
Which rotation fixes an AVL insertion in the left-left case?
An LL imbalance is repaired by a single right rotation.
Which rotation fixes an AVL insertion in the right-right case?
An RR imbalance is repaired by a single left rotation.
Which AVL case requires a double rotation of left then right?
An LR imbalance is repaired by left rotation of the child followed by right rotation of the node.
Which AVL case requires a double rotation of right then left?
An RL imbalance is repaired by right rotation of the child followed by left rotation of the node.