question: static private double quickSelect ( IDoubleVector x , int k , int start , int end ) { if ( k < start || k > end ) { throw new AdeCoreIllegalArgumentException ( "requested selection is outside of range" ) ; } final int pivotIndex = ( ( int ) Math . random ( ) * ( end - start + 1 ) ) + start ; final int pivotPosition = partition ( x , start , end , pivotIndex ) ; if ( pivotPosition == k ) { return x . get ( k ) ; } else if ( pivotPosition < k ) { return quickSelect ( x , k , pivotPosition + 1 , end ) ; } else { return quickSelect ( x , k , start , pivotPosition - 1 ) ; } }
target:  quickSort like algorithm to select k'th member.  Has expected linear performance but o(n^2) worst case. Considered to have good performance in practice 