If I am getting the question right, I believe both the above trees represent
this input:
5(N) 3(N) 1(L) 9(N) 7(L) 10(L)
5
/ \
3 10
/ \
1 9
\
7
5
/ \
3 9
/ / \
1 7 10
Let's get to this very simple example below:
5(N), 9(L) is the input.
The tree could be one of the below and hence not unique.
5 5
/ \
9 9
Did I get the question wrongly ?
Thanks,
Balaji.
On Fri, Jan 14, 2011 at 10:39 PM, juver++ <[email protected]> wrote:
> @balaji_ramani
> That is why there is additional info (L or N). So it is solvable during
> dfs.
>
> --
> 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]<algogeeks%[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.