Modified quicksort partitioning routine to look up either left of the current pivot or the right (depending if the Kth largest element is lesser or more than the current chosen pivot). The algorithm is O(n) average.