edited by
7,631 views
17 votes
17 votes

The inorder and preorder traversal of a binary tree are

$\text{d b e a f c g}$ and $\text{a b d e c f g}$, respectively

The postorder traversal of the binary tree is:

  1. $\text{d e b f g c a}$

  2. $\text{e d b g f c a}$

  3. $\text{e d b f g c a}$

  4. $\text{d e f g b c a}$

edited by

3 Answers

Best answer
22 votes
22 votes

The answer is A.

Take the first node in preorder traversal - a will be the root of the tree
All nodes to the left of '$a$' in inorder traversal will be in the left subtree of '$a$' and all elements on the right will be in the right subtree of '$a$'. 
Take the second element from preorder traversal - '$b$' - goes to left subtree of '$a$' as it is in the left of '$a$' in inorder list. 
Proceeding likewise we can construct the binary tree as:

edited by
1 votes
1 votes
Firstly we have to find Binary tree from inorder and preorder then we can find postorder

debfgca option A is right
1 votes
1 votes

Answer Is Option(A)

see the below explanation

Answer:

Related questions

0 votes
0 votes
2 answers
1
29 votes
29 votes
3 answers
3
Kathleen asked Sep 21, 2014
31,604 views
The maximum number of binary trees that can be formed with three unlabeled nodes is:$1$$5$$4$$3$