private static int[] bubbleSort(int[] array){
if(array!=null&&array.length>1){
for(int i=array.length-1;i>0;i--){
for(int j=0;j<i;j++){
if(array[j]>array[j+1]){
int temp = array[j];
array[j] = array[j+1];
array[j+1] = temp;
}
}
}
}
return array;
}
时间复杂度O(n)=n-1+n-2+……+1=1/2*n^2=n^2