Maximum Sized Binary Search Tree in a Binary Tree:
http://www.rawkam.com/?p=822

On Mon, Sep 27, 2010 at 10:34 AM, Chonku <[email protected]> wrote:

> @Prodigy
> As per your example, 8 15 20 25 which is the is indeed the maximum binary
> search tree in this binary tree is only a solution to smaller problem used
> to solve a bigger problem.
> The solution to smaller problem can be translated directly to the solution
> of the bigger problem.
>
> On Mon, Sep 27, 2010 at 8:28 AM, prodigy <[email protected]>wrote:
>
>>                   15
>>                  /    \
>>               8      25
>>                      /    \
>>                  20      22
>>
>>
>> On Sep 26, 10:45 am, Chonku <[email protected]> wrote:
>> > This can also be done if we do an inorder traversal of the binary tree
>> and
>> > look for the longest continuous sequence of numbers in ascending order.
>>
>> Your idea will fail for above case.
>>
>> In Order =>  8 15 20 25 22
>> longest continuous sequence of numbers in ascending order => 8 15 20
>> 25
>>
>> But that's not the answer (I hope you realize what correct output
>> would be )
>>
>>
>>
>>
>>
>> --
>>  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]<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.

Reply via email to