int upper = count - 1;
IntArray stack = quicksortStack;
stack.add(lower);
stack.add(upper - 1);
while (stack.size > 0) {
upper = stack.pop();
lower = stack.pop();
if (upper <= lower) continue;
int i = quicksortPartition(values, lower, upper);
if (i - lower > upper - i) {
stack.add(lower);