Can't we use k iterations of bubble sort ? On Jun 18, 2012 2:11 PM, "Ramindar Singh" <[email protected]> wrote:
> We can use Median of medians > > > http://en.wikipedia.org/wiki/Selection_algorithm#Linear_general_selection_algorithm_-_Median_of_Medians_algorithm > > > On Sunday, 17 June 2012 08:13:18 UTC+5:30, Prem Nagarajan 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 view this discussion on the web visit > https://groups.google.com/d/msg/algogeeks/-/4lQsacmUPYUJ. > 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.
