@Ashish Building a treeis of O(nlogn) complexity. Linear solution is
much appreciated.

On Sun, Jun 17, 2012 at 2:00 PM, Amitesh Singh <[email protected]>wrote:

> check out this:
> RANDOMIZED-SELECT in O(n):
>
> http://amiteshsingh.wordpress.com/2012/06/08/iterative-randomized-select/
>
> --
> Amitesh
>
>
>
>
> On Sun, Jun 17, 2012 at 1:24 PM, Ashish Goel <[email protected]> wrote:
>
>> is the modification of the given array allowed?
>>
>> if yes use quick select, otherwise build tree where each node keeps count
>> of its left subtree
>> Best Regards
>> Ashish Goel
>> "Think positive and find fuel in failure"
>> +919985813081
>> +919966006652
>>
>>
>>
>> On Sun, Jun 17, 2012 at 8:13 AM, Prem Nagarajan 
>> <[email protected]>wrote:
>>
>>> Give an array of unsorted elements, find the kth smallest element in the
>>> array.
>>>
>>> The expected time complexity is O(n) and no extra memory space should be
>>> used.
>>>
>>> Quickselect algorithm can be used to obtain the solution. Can anyone
>>> explain how quickselect works?
>>>
>>> --
>>> 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.
>>
>
>  --
> 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