for (i=0; i for (j=0; j if (arr[j] > arr[j+1]) {temp = arr[j];arr[j] = arr[j+1];arr[j+1] = temp;}}}
代码没有贴对,但是从残存的代码看,这是冒泡排序,冒泡排序的平均复杂度:O( n^2 )