标签:style io java ar for sp on c amp
//Simple insertion sort
public static void insertionSort(Object obj){
for(int p=1;p<obj.length;p++){
Object temp=a[p]; //记住p位置的数组值
int j=p; //记住p位置
for(;j>0&&temp.compareTo(a[j-1])<0;j--){ //依次向前比较
a[j]=a[j-1];
}
}
}
标签:style io java ar for sp on c amp
原文地址:http://blog.csdn.net/hephec/article/details/39324929