摘要:
//谢尔排序又称缩小增量排序法(对直接插入法的改进)#include<iostream>using namespace std;void ShellSort(int k[],int n){ int i,j,flag,gap=n; int temp; while(gap>1) { gap=gap/2; do{ flag=0; for(i=0;i<=n-gap;i++) { j=i+gap; if(k[i]>k[j]) ... 阅读全文
posted @ 2012-09-09 23:51
myth_HG
阅读(235)
评论(0)
推荐(0)