Boost logo

Boost :

From: Hans Larsen (hans_at_[hidden])
Date: 2007-03-16 15:43:50


Maybe finding the nth element of an array, without actually sorting
the array. This could be useful for finding 2nd min/max and median
of an array reusing the same algorithm.

This is actually quite easy, and may have already been implemented in
boost or stl (but i haven't found it yet). It's a similar technique
to quicksort, except you only aim at finding an element and you care
not about the side of the pivot that is not interesting. It is O((log
(n)) IIRC.

What you think?

Regards,
Hans

On 16-Mar-07, at 2:01 PM, Sam Schetterer wrote:

> What other sorting related stuff would users like besides just sorting
> functions? I will try to implement any improvements or new ideas
> that users
> want.
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/
> listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk