Yeah, right. the same algo of binary tree can be used for bst also but
using that is expensive.

On Mon, Nov 14, 2011 at 9:56 PM, AMAN AGARWAL <mnnit.a...@gmail.com> wrote:

> Hi,
>
> I think it matters whether its a bst or normal tree. In BST left node is
> smaller and the right node is greater than the root node, but no such
> constraint is applicable for a binary tree.
>
> Regards,
> Aman.
>
>
> On Mon, Nov 14, 2011 at 10:12 AM, sumit mahamuni <
> sumit143smail...@gmail.com> wrote:
>
>> Hi,
>>
>>
>> On Mon, Nov 14, 2011 at 1:52 AM, AMAN AGARWAL <mnnit.a...@gmail.com>wrote:
>>
>>>
>>> Hi,
>>>
>>> Please tell me the solution of this question.
>>>
>>> write a program which find LCA of a binary tree. It is not a BST
>>>
>> Does it matter its a BST or binary tree? the algo will be same for the
>> BST or binary tree.
>>
>>
>>>
>>> Regards,
>>> Aman,
>>>
>>> --
>>> AMAN AGARWAL
>>> "Success is not final, Failure is not fatal: It is the courage to
>>> continue that counts!"
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> Thanks and Regards,
>> Sumit Mahamuni.
>>
>> -- Slow code that scales better can be faster than fast code that
>> doesn't scale!
>> -- Tough times never lasts, but tough people do.
>> -- I love deadlines. I like the whooshing sound they make as they fly
>> by. - D. Adams
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
> AMAN AGARWAL
> "Success is not final, Failure is not fatal: It is the courage to continue
> that counts!"
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Thanks and Regards,
Sumit Mahamuni.

-- Slow code that scales better can be faster than fast code that doesn't
scale!
-- Tough times never lasts, but tough people do.
-- I love deadlines. I like the whooshing sound they make as they fly by. -
D. Adams

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to