recategorized by
1,380 views
4 votes
4 votes
Suppose binary tree has only three nodes A,B and C, and you are given the post order traversal of tree as B-A-C . The exact pre order traversal of the tree is?
A)C-A-B

B)A-B-C

C)C-B-A

D)Can't be determined from given information.
recategorized by

2 Answers

1 votes
1 votes

we can not determine ecectlly(uniqlly) what is preorder if postorder is given .

we can  see in the below binary tree we cant determine .

0 votes
0 votes
D. Can't be determined from the given info.

The pre-order has 2 possibilities- C-A-B and C-B-A

Related questions

0 votes
0 votes
1 answer
1
Prince Sindhiya asked Jan 2, 2019
701 views
A full binary tree is a tree in which every node other than the leaves has two children. If there are 600 leaves then total number of leaf nodes are?
2 votes
2 votes
3 answers
2
1 votes
1 votes
1 answer
3
0 votes
0 votes
0 answers
4