我可以给你一些参考代码:
public static void quickSort(int[] arr, int low, int high) { if (arr == null || arr.length == 0) return;
if (low >= high)
return;
// 挑选基准元素
int middle = low + (high - low) / 2;
int pivot = arr[middle];
// 数组分区
int i = low, j = high;