public void calcQuickSort(ArrayList<Integer> in, Integer l, Integer r) {
        ArrayList<Integer> calc = this.copyArray();
        Integer left = l, right = r;
        Integer pivot = calc.get(l + (r - l) / 2);
        this.op++;
        while (left <= right) {
            while (calc.get(left) < pivot) {
                this.op++;
                left++;
            }
            while (calc.get(right) > pivot) {
                this.op++;
                right--;
            }
            this.op++;
            if (left <= right) {
                Collections.swap(calc, left, right);
                this.op += 2;
                left++;
                right--;
            }
        }
        if (l < right) {
            this.calcQuickSort(calc, l, right);
        }
        if (left < r) {
            this.calcQuickSort(calc, left, r);
        }
    }