标签:art public amp end quic oid class lan start
后续更新双端快排,以及Arrays.sort()中的三路快排。
public void quickSort(int[] num,int start,int end){
if (start>=end){
return;
}
int i = start;
int j = end;
while(i<j){
while(i<j && num[j]>=num[start]) j--;
while(i<j && num[i]<=num[start]) i++;
if (i<j){
int temp = num[i];
num[i] = num[j];
num[j] = temp;
}
}
int temp = num[start];
num[start] = num[i];
num[i] = temp;
quickSort(num,start,i-1);
quickSort(num,i+1,end);
}
标签:art public amp end quic oid class lan start
原文地址:https://www.cnblogs.com/wliamchen/p/13226467.html