Consider a Binary Search Tree given below. What is the pre-order traversal of…

2021

Consider a Binary Search Tree given below.

image.png

What is the pre-order traversal of the binary search tree after node 14 is deleted?

image.pngimage.png
  1. A.

    7, 10, 11, 13, 16, 18, 20, 22, 25

  2. B.

    16, 10, 7, 13, 11, 20, 18, 25, 22

  3. C.

    16, 7, 10, 13, 11, 18, 22, 20, 25

  4. D.

    25, 20, 22, 18, 11, 13, 10, 16, 7

Attempted by 238 students.

Show answer & explanation

Correct answer: B

To find the pre-order traversal after deleting node 14 from the Binary Search Tree, follow these steps:
Identify the node to delete: 14. Node 14 has two children (10 and 16), so we need to find its in-order successor. The in-order successor is the smallest value in the right subtree of 14, which is 16. Replace 14 with 16 and remove the original 16 from its position. Perform pre-order traversal (root, left, right) on the modified tree. The resulting pre-order traversal is 16, 10, 7, 13, 11, 20, 18, 25, 22.

Explore the full course: Up Lt Grade Assistant Teacher 2025