Consider the following binary search tree: Root: 24
Consider the following binary search tree:
Root: 24
24 → left child 12, right child 26
12 → left child 11, right child 16
16 → left child 13
If we remove the root node, which of the node from the left subtree will be the new root?
Show answerHide answer
Correct answer: (D) 16
Explanation
If we delete the root node of a binary search tree, it can be replaced by its inorder successor or inorder predecessor. The inorder predecessor of 24 (largest node in the left subtree) is 16 and the inorder successor is 26. So, from the left subtree, 16 will be the new root.