publicstaticint[] quickSort(int[] ints, int start, int end){ if (start > end){ return ints; } //基点,第一个数 int pivot = ints[start]; //左指针 int left = start; int right = end; while (left < right){ while (ints[right] >= pivot && left < right){ right --; } while (ints[left] <= pivot && left < right){ left ++; } if (left < right){ int temp = ints[right]; ints[right] = ints[left]; ints[left] = temp; } } ints[start] = ints[left]; ints[left] = pivot; quickSort(ints, start, left -1); quickSort(ints, left + 1, end); return ints; }