public static int partition2(int[] records, int low, int high){
        if(low > records.length - 1|| high > records.length - 1) {
            throw new IllegalArgumentException();
        }
        int pivot = records[low];
        while(low < high){
            while (records[high] > pivot && low < high){
                high--;
            }
            records[low] = records[high];
            while (records[low] < pivot && low < high){
                low++;
            }
            records[high] = records[low];
        }
        records[low] = pivot;
        return low;

    }