#include#include using namespace std; int a[10] = {5,6,7,4,2,1,5,3,8,4}; void quickSort(int left,int right) { if(left>right)return;//base case 即分治之后的数组只有一个元素的情况 int i,j; int temp; i=left; j=right; temp = a[left]; while(i!=j) { while(a[j]>=temp && j>i)j--; while(a[i]<=temp && i



