夏老师 C++微服务架构
public static int partition(int[] array, int left, int right) {
// 挑选最右侧的作为基准值
int pivotValue = array[right];
int storeIndex = left;
for (int i = left; i < right; i++) {
if (array[i] <= pivotValue) {
swap(array, i, storeIndex);
storeIndex += 1;
}