but the tree can be created from a preorder walk is more than 1 right? so
the question only ask for 1?
On Feb 6, 2011 7:31 AM, "jalaj jaiswal" <[email protected]> wrote:
> My solution in more detail (in words ):-
>
> start from the end if you get an L
> make a node with data L and push its pointer in stack,
> if you get a M pop two elements from stack
> make them left and right children of M and then push
> back m's pointer to stack(if stack is empty then stack returns NULL when
> popped)
>
> at the end root is on the top :>
>
>
>
> On Sun, Feb 6, 2011 at 6:36 PM, bittu <[email protected]> wrote:
>
>> @anurag
>>
>> Good solution dear.
>>
>> Thanks
>> Shashank
>>
>> --
>> 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.
>>
>>
>
>
> --
> With Regards,
> *Jalaj Jaiswal* (+919019947895)
> Final Year Undergraduate,
> IIIT ALLAHABAD
>
> --
> 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.
>

-- 
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.

Reply via email to