327 views
2 votes
2 votes
Is it possible to construct multiple binary from given preorder and postorder?

1 Answer

Best answer
4 votes
4 votes

Before some days I also had same doubt Yes multiple binary trees possible 

With preorder and postorder, we can't create a unique binary tree. There will be ambiguity and multiple trees can exist.

For example,

 


selected by

Related questions

0 votes
0 votes
1 answer
2
kickassakash asked Jul 4, 2023
421 views
I have specific doubt on this question and I’ve tried to explain that in the picture ,If anyone can explain it then it’ll be of great help. according to sachin sir th...
0 votes
0 votes
1 answer
3
Souvik33 asked Apr 2, 2023
430 views
There are Insert and Retrieve_Max operations on a set {}. for n such operations what is the time complexity of the efficient algorithm possible?$n^{2}$nlogn n logn
0 votes
0 votes
1 answer
4
Souvik33 asked Nov 2, 2022
865 views
Which data structure would be most appropriate to implement a collection of values with the following 3 characteristicsSingly link list with head and tail pointerDoubly l...