For a binary tree , if we are given an inorder traversal and a preorder/postorder/level-order traversal, we can always reconstruct back the binary tree. This technique can be used to save and restore the binary tree efficiently.
I have read that it is necessary to have an inorder traversal to reconstruct the tree. i.e. if we are given a preorder and a postorder traversal, the binary tree can not be reconstructed. Can someone help me in understanding why this is so? i.e. why is inorder traversal a mandatory requirement. Why can not we reconstruct the tree with a given preorder and a postorder Thanks to everyone for their suggestions and replies. ~Himanshu Aggarwal -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.