One more query, insert into bst is O(n) and then do inorder to get them in
sorted order. This is an example of sorting in O(n) time. is this correct?

On Mon, Mar 28, 2011 at 6:06 PM, Ashim Kapoor <[email protected]> wrote:

> How do you use inorder traversal to find longest sub sequence?
>
>
> On Mon, Mar 28, 2011 at 6:03 PM, bittu <[email protected]> wrote:
>
>> its (not aplicable).
>>
>> sorting nlogn  i said time O(n)  & O(1) space
>>
>> i think we can use BST , put all elements in BST O(n) then  do inorderto
>> find longest sub sequence  still O(n) ..no no no its Ol(ogn)
>>
>> suggest another way to solve it
>>
>> 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.
>>
>>
>

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