The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+7 votes
1.2k views

The pre-order traversal of a binary search tree is given by 12, 8, 6, 2, 7, 9, 10, 16, 15, 19, 17, 20. Then the post-order traversal of this tree is

  1. 2, 6, 7, 8, 9, 10, 12, 15, 16, 17, 19, 20
  2. 2, 7, 6, 10, 9, 8, 15, 17, 20, 19, 16, 12
  3. 7, 2, 6, 8, 9, 10, 20, 17, 19, 15, 16, 12
  4. 7, 6, 2, 10, 9, 8, 15, 16, 17, 20, 19, 12
asked in DS by Veteran (327k points)
recategorized by | 1.2k views
B is the right answer

5 Answers

+5 votes
Best answer

so ans is B

answered by Boss (6.2k points)
selected by
+2 votes
Sorting the given sequence gives Inorder traversal.

Constructing tree gives Option B as the postorder traversal.
answered by Active (2.4k points)
+1 vote
B) is the answer
answered by Loyal (2.9k points)
0 votes
answer will be B . 100% sure
answered by Loyal (4.5k points)
0 votes
B is the answer of the above question.
answered by (27 points)


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

29,158 questions
36,985 answers
92,166 comments
34,824 users