Reconstructing Binary Tree by traversals arrays

Pre -> Root → Left → Right
IN -> Left → Root → Right
Post -> Left → Right → Root

Pre-Order: First node of pre-order traversal output is always the root.
Post-Order: Last node of post-order traversal output is always the root.


Pasted image 20250215185318.png

Why Can't "Pre-order + Post-order" Reconstruct a Tree?

With Pre-order and Post-order, we know:

However, we don’t know where to split the tree into left and right subtrees without in-order information.

Problems: