文件名称:ShellSort
-
所属分类:
- 标签属性:
- 上传时间:2015-10-03
-
文件大小:1.09kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
首先取一个整数 gap < n(待排序记录数) 作为间隔, 将全部记录分为 gap 个子序列, 所有距离为 gap 的记录放在同一个子序列中
在每一个子序列中分别施行直接插入排序。
然后缩小间隔 gap, 例如取 gap = gap/2
重复上述的子序列划分和排序工作,直到最后取gap = 1, 将所有记录放在同一个序列中排序为止-First, take an integer gap < n (the number of records to be sorted) as the interval, all records will be divided into sub-sequence gap, all distances for the gap recorded in the same sub-sequence, respectively, in each sub-sequence directly into sorting purposes. Then narrow spacing gap, for example, take the gap = gap/2 sequence described above is repeated division and sorting work, until finally take gap = 1, all records in the same sort sequence so far
在每一个子序列中分别施行直接插入排序。
然后缩小间隔 gap, 例如取 gap = gap/2
重复上述的子序列划分和排序工作,直到最后取gap = 1, 将所有记录放在同一个序列中排序为止-First, take an integer gap < n (the number of records to be sorted) as the interval, all records will be divided into sub-sequence gap, all distances for the gap recorded in the same sub-sequence, respectively, in each sub-sequence directly into sorting purposes. Then narrow spacing gap, for example, take the gap = gap/2 sequence described above is repeated division and sorting work, until finally take gap = 1, all records in the same sort sequence so far
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ShellSort.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.