public void quicksort(int[] nums, int begin, int end) {
        if (begin < end) {
            int pos = partition(nums, begin, end);
            quicksort(nums, begin, pos - 1);
            quicksort(nums, pos + 1, end);
        }
    }