public static void insertSort(int[] a){
if((a!=null)){
for(int i=1;i<a.length;i++){
int temp=a[i];
int j=i;
if(a[j-1]>temp){
while(j>=1&&a[j-1]>temp){
a[j]=a[j-1];
j--;
}
}
a[j]=temp;
}
}
}
if((a!=null)){
for(int i=1;i<a.length;i++){
int temp=a[i];
int j=i;
if(a[j-1]>temp){
while(j>=1&&a[j-1]>temp){
a[j]=a[j-1];
j--;
}
}
a[j]=temp;
}
}
}