Re: [algogeeks] Re: [Amazon] : constructing fully binary tree

2012-08-08 Thread Aman Jain
in one special case of binary tree where each internal node has 2 children; we can construct binary tree from these pre and postorder traversals. On Wed, Aug 8, 2012 at 12:11 PM, Navin Kumar wrote: > @shiv narayan: we are not going to create exact tree as original. You > have to build full binary

Re: [algogeeks] Re: [Amazon] : constructing fully binary tree

2012-08-07 Thread Navin Kumar
@shiv narayan: we are not going to create exact tree as original. You have to build full binary tree where as original tree may / may not be full binary tree. On Wed, Aug 8, 2012 at 2:31 AM, shiv narayan wrote: > Preorder and postorder do not uniquely define a binary tree. > so question is vague

[algogeeks] Re: [Amazon] : constructing fully binary tree

2012-08-07 Thread shiv narayan
Preorder and postorder do not uniquely define a binary tree. so question is vague . On Sunday, 15 July 2012 01:41:15 UTC+5:30, Navin Kumar wrote: > > Given Preorder and postorder traversals of a tree. Device an algorithm to > constuct a fully binary tree from these traversals. -- You received t

[algogeeks] Re: [Amazon] : constructing fully binary tree

2012-08-07 Thread shiv narayan
Preorder and postorder do not uniquely define a binary tree. so question is vague . On Sunday, 15 July 2012 01:41:15 UTC+5:30, Navin Kumar wrote: > > Given Preorder and postorder traversals of a tree. Device an algorithm to > constuct a fully binary tree from these traversals. -- You received t

[algogeeks] Re: [Amazon] : constructing fully binary tree

2012-08-07 Thread harsha
Can u please explain the algorithm. is n't inorder always needed to construct a unique tree? On Sunday, July 15, 2012 1:41:15 AM UTC+5:30, Navin Kumar wrote: > > Given Preorder and postorder traversals of a tree. Device an algorithm to > constuct a fully binary tree from these traversals. -- Y