public static void quicksortWithStack(Object[] keys, int[] counts, int left, int right) {
if (right <= left) return;
StackOfInts lStack = new StackOfInts(), rStack = new StackOfInts();
lStack.push(left);
rStack.push(right);
while(!lStack.isEmpty()){
left = lStack.pop();
right = rStack.pop();
int i = partition(keys, counts, left, right);
if (i-1 > left){