public void quickSort(int left, int right) {
        if (right <= left)
            return;
        int lt = left, gt = right;

        int i = lt;

        int pivotIndex = (int) (Math.random() * (right - left)) + left;

        T pivot = this.array[pivotIndex];

        swapArrayValues(left, pivotIndex);

        while (i <= gt) {

            int cmp = this.array[i].compareTo(pivot);

            if (cmp < 0)
                swapArrayValues(lt++, i++);
            else if (cmp > 0)
                swapArrayValues(gt--, i);
            else
                i++;

        }

        quickSort(left, lt - 1);
        quickSort(gt + 1, right);

    }