- Nov 2017
// The search space within the array is changing for each round - but the list // is still the same size. Thus, k does not need to be updated with each round.
If you do not do this you will have to keep moving the kth index every time respective of the size of the array.
if (pivotIdx < k - 1): quickSelect(A, pivotIdx + 1, end, k-1 - (pivotIdx + 1)); if (pivotIdx > k - 1): quickSelect(A, start, pivotIdx - 1, k - 1);