Consider the situation where you have two lists of nodes of which all you know is that one is a representation of a preorder traversal of some tree and the other a represent
As already pointed out by others, a binary tree can not be reconstructed by using only pre and post order traversal. A single child node has ambiguous traversals that cannot identify whether it is left or right child e.g. consider following preorder and postorder traversals: preorder: a,b postorder b,a
It can produce both of the following trees
a a \ / b b It is simply not possible to know if b is a's left or right child without any additional information like inorder traversal.