public static void main(String[] args) {
int[] a={8,9,2,2222,2,8,9,3,55,55,89,89};
//System.out.println("000000000");
quickSort(a, 0, a.length-1);
// System.out.println(Integer.toBinaryString(a[0]));
// findLost(a);
// findTwoOtherNum(a);
for(int kk:a){
System.out.print(kk+",");
}
}
public static void quickSort(int[] a,int s,int e){
int i=s;
int j =e;
if(i<j){
int x=a[i];
while(i!=j){
while(a[j]>x&&i<j){
j--;
}
if(i<j){
a[i]=a[j];
i++;
}
while(a[i]<x&&i<j){
i++;
}
if(i<j){
a[j]=a[i];
j--;
}
}
a[i]=x;
quickSort(a,s,i-1);
quickSort(a,i+1,e);
}
}
运行结果