public class QuickSelect<T>
extends java.lang.Object
Implementation of Tony Hoare's quickselect algorithm. Running time is generally O(n), but worst case is O(n^2) Pivot choice is
median of three method, providing better performance than a random pivot for partially sorted data.
http://en.wikipedia.org/wiki/Quickselect
- 作者:
- Jon Renner