@Anshu: for a tree
15
15
7 18 and
7 17
17 18
inorder traversal is same: 7,15,17,18
then how it could be possible to recreate the specific one. Preorder of BST
is sorted one, so possible solution could be any BST containing all the
elements in the preorder array.
On Tue, Oct 18, 2011 at 1:41 PM, anshu mishra <[email protected]>wrote:
> @Anand
>
> As given it is a BST so any single traversal(pre or post or in) is
> sufficient to construct the tree. :P
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
--
Regards,
Rahul Patil
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.