标签:style blog color for ar div line amp
//QuickSort快速排序 public void quickSort(int[] arr,int l,int r){ if(l<r){ int i=l; int j =r; int x = arr[l]; while(i<j){ while( i<j && arr[j]>x) j--; if(i<j){ arr[i]=arr[j]; i++; } while(i<j && arr[i]<x) i++; if(i<j){ arr[j]=arr[i]; j--; } } arr[i]=x; for(int d:arr){ System.out.print(d+" "); } System.out.print(endline); quickSort(arr,l,i-1); quickSort(arr,i+1,r); } }
标签:style blog color for ar div line amp
原文地址:http://www.cnblogs.com/longneo/p/3902938.html