public void sort(Comparable[] arr, int start, int end) {
        int low = start;
        int high = end;
        if(low >= high) {
            return;
        } else if(low == high - 1) {
            if(Compare.gt(arr[low], arr[high])) {
                swap(arr, low, high);
            }
            return;
        }

        /*
         * Pick a pivot and move it out of way
         */
        int pivotIndex = (low + high) / 2;
        Comparable pivot = arr[pivotIndex];
        swap(arr, pivotIndex, high);

        while(low < high) {
            /*
             * Search forward from low until an element is found that
             * is greater than the pivot or low >= high
             */
            while(Compare.le(arr[low], pivot) && low < high) {
                low++;
            }

            /*
             * Search backward from high until an element is found that
             *  is less than pivot or low >= high
             */
            while(Compare.le(pivot, arr[high]) && low < high) {
                high--;
            }

            if(low < high) {
                swap(arr, low, high);
            }
        }

        /*
         * Put the median in the "center" of the list
         */
        arr[end] = arr[high];
        arr[high] = pivot;

        /*
         * Recursive calls, elements arr[start] to arr[low-1] are less than or
         * equal to pivot, elements arr[high]+1 to arr[end] are greater than pivot
         */
        sort(arr, start, low-1);
        sort(arr, high+1, end);
        
    }