Question 94Asked in BPSC TRE 3.0 (2024) Computer Science Class 11-12

The preorder traversal of a binary search tree is 15, 10, 12, 11,20, 18, 16, 19. Which one of the following is the postorder traversal of the tree?

  1. A20, 19, 18, 16, 15, 12, 11,10
  2. B11, 12, 10, 16,19,18,20,15
  3. C19, 16, 18,20,11,12,10,15
  4. DMore than one of the above
  5. ENone of the above
Show answerHide answer

Correct answer: (B) 11, 12, 10, 16,19,18,20,15

Explanation

Root 15. The left subtree from 10, 12, 11 is 10 with right child 12, whose left child is 11. The right subtree is 20 with left child 18, whose children are 16 and 19. Postorder: 11, 12, 10, 16, 19, 18, 20, 15.

From BPSC TRE 3.0 (2024) Computer Science Class 11-12 — Previous Year Paper

This is question 94 of BPSC TRE 3.0 (2024) Computer Science Class 11-12 — Previous Year Paper. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.