in DS edited by
6,375 views
2 votes
2 votes

If $\text{Tree-1}$ and $\text{Tree-2}$ are the trees indicated below:

Which traversals of $\text{Tree-1}$ and $\text{Tree-2}$, respectively, will produce the same sequence?

  1. Preorder, postorder
  2. Postorder, inorder
  3. Postorder, preorder
  4. Inorder, preorder
in DS edited by
by
6.4k views

4 Comments

A mistake is there in the question.
0
0
In option B

Postorder: GJIHEFDBCA

Inorder :  GJIHEFBDCA

Here BD sequence is not correct

Hence none of the option is correct.
0
0
But none of this is not there in the options :D

The only way now is to leave the question itself.
0
0

4 Answers

6 votes
6 votes
There is some discrepancy in this question. Postorder of Tree 1 : GJIHEFDBCA . Inorder of Tree 2 : GJIHEFBDCA. So I guess anyone attempting the question would be given marks.
3 votes
3 votes

none of these 

4 Comments

Nice. Did you choose none of these in the exam?
0
0
You can leave the option.
1
1
please do the correction for INORDER traversal of tree T2 ✍
1
1

Inorder traversel in t2 tree is wrong.Please do the correction.

2
2
0 votes
0 votes
No option is correct

          $Tree 1$                                                                                                        

$PreOrder:ABDEGHIJFC$                                              

$InOrder: BGEHIJDFAC$                                                 

$PostOrder: GJIHEFDBCA$     

 

 

 

        $Tree 2$

$PreOrder:GFEIJHCDBA$

$InOrder:   GJIHEFBDCA$

$PostOrder: JHIEBDACFG$

 clearly we can see no order of tree 1 matches with any order of tree 2
by
0 votes
0 votes
No option is correct .
Answer:

Related questions