/**
* 冒泡排序 */public static void Bubble(int[] array){
for(int i=0;i<array.length-1;i++){ for(int j=0;j<array.length-1-i;j++){ if(array[j]>array[j+1]){ int temp=0; temp=array[j]; array[j]=array[j+1]; array[j+1]=temp; } } } for(int i=0;i<array.length;i++){ System.out.println(array[i]); } }/**
* 快速排序 */ public static int getmidle(int[] a,int m,int n){ int key=a[m]; while(m<n){ while(m<n&&a[n]>=key){ n--; } a[m]=a[n]; while(m<n&&a[m]<=key){ m++; } a[n]=a[m]; } a[m]=key; return m; } public static void quickSort(int[] a,int low,int high){ if(low<high){ int midle=getmidle(a,low,high); quickSort(a,low,midle-1); quickSort(a,midle+1,high); }