If I have the preorder and postorder traversals, can I construct a tree that isn't necessarily a binary tree? Something like:
Pre-order: KLMOPN
Post-order: LOPMNK
Build:
K
/ | \
L M N
/ \
O P
I've read that this is not possible without inorder traversal for binary trees, but is it possible to do it with just preorder and postorder traversals for a non-binary tree?