插入排序-希尔排序
摘要:1 void ShellSort(int list[],int n) 2 { 3 int gap = n / 2; 4 while(gap){ 5 int i,j,temp; 6 for(i = gap; i < n; i++) 7 { 8 temp = list[i]; 9 if(temp < list[i-gap])10 {11 for(j = i - gap; j >=0 && temp < list[j]; j-=ga...
阅读全文
posted @ 2011-11-10 11:07