<pre name="code" class="java">//插入排序的递归写法
public static void digui_insert(int[] a,int index){
if(index>=a.length){
System.out.print(Arrays.toString(a));
return;
}
int key = a[index];
int i = index -1;
while(i>=0&&a[i]>key){
a[i+1]=a[i];
i--;
}
a[i+1]=key;
digui_insert(a,index+1);
}