edited by
18,582 views
2 votes
2 votes

The post-order traversal of binary tree is $\text{ACEDBHIGF}$. The pre-order traversal is

  1. $\text{A B C D E F G H I}$
  2. $\text{F B A D C E G I H}$
  3. $\text{F A B C D E G H I}$
  4. $\text{A B D C E F G I H}$
edited by

4 Answers

6 votes
6 votes
You cannot create a unique tree with post and pre-order traversal you need to have either inorder with preorder or postorder this question seems ambiguous , if it would have been Binary search tree then inorder is sorted sequence and tree is possible but here only binary tree is given.
1 votes
1 votes

The option which might be correct are b,c

Explanation:


 

 

 

 

 

 

 

 

 

 

 

 

 

We can definitely say that the root is F. A can never be the root. While out of option B and C one can't say correctly which would be a preorder for the given postorder. In order to find the preorder, we have to find all the possible trees.

So B or C or None of the options would be correct

edited by
0 votes
0 votes
it may be answer c-because here in post-order(left right root) leftmost element is A and at last root element is given as F and as per preorder (root left right) so first element must be F and then C(because it is leftmost element in post-order).
0 votes
0 votes
You cannot find pre-order traversal using post-order traversal only. I think you wrote a wrong question. It must be binary search tree then only we can find the post order traversal.
Answer:

Related questions

2 votes
2 votes
2 answers
1
GO Classes asked Feb 4
274 views
Consider a binary tree. Among the following traversal combinations, which of them can uniquely construct the tree?Inorder + PreorderPreorder + PostorderOnly InorderInorde...
2 votes
2 votes
3 answers
2
6 votes
6 votes
3 answers
3
Satbir asked Jan 13, 2020
3,244 views
Of the following, which best approximates the ratio of the number of nonterminal nodes in the total number of nodes in a complete $K$-ary tree of depth $N$ ?$1/N$$N-1/N$$...
4 votes
4 votes
3 answers
4
Satbir asked Jan 13, 2020
2,872 views
Convert the pre-fix expression to in-fix $- ^{\ast} +ABC^{\ast} – DE+FG$$(A-B)^{\ast}C+(D^{\ast}E)-(F+G)$$(A+B)^{\ast}C-(D-E)^{\ast}(F+G)$$(A+B-C)^{\ast}(D-E)^{\ast}(F+...