Question 75Asked in DSSSB TGT Computer Science (Technical), 1 Aug 2021, Shift 1

Preorder traversal of binary search tree is 38, 14, 8, 23, 18, 20, 56, 45, 82, 70. What is the postorder traversal of binary search tree?

  1. A23, 20, 18, 14, 8, 38, 45, 56, 70, 82
  2. B8, 18, 20, 23, 14, 45, 70, 82, 56, 38
  3. C8, 20, 18, 23, 14, 45, 70, 82, 56, 38
  4. D82, 70, 56, 45, 38, 23, 20, 18, 14, 8
Show answerHide answer

Correct answer: (C) 8, 20, 18, 23, 14, 45, 70, 82, 56, 38

Explanation

The BST is 38 with left subtree 14 (8, and 23 with left child 18 whose right child is 20) and right subtree 56 (45, and 82 with left child 70). Postorder: 8, 20, 18, 23, 14, 45, 70, 82, 56, 38.

From DSSSB TGT Computer Science PYQ (Technical), 1 Aug 2021, Shift 1

This is question 75 of DSSSB TGT Computer Science PYQ (Technical), 1 Aug 2021, Shift 1. 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.