资 源 简 介
希尔排序算法:
基本思想:将整个无序序列分割成若干小的子序列分别进行插入排序。 序列分割方法:将相隔某个增量h的元素构成一个子序列。在排序过程中,逐次减小这个增量,最后当h减到1时,进行一次插入排序,排序就完成。增量序列一般采用:ht=2t-1,1≤t≤[log2n],其中n为待排序序列的长度。-Hill sorting algorithm: the basic idea: the whole sequence disorder is separated into a number of small sub-sequences respectively Insertion Sort. Sequence segmentation method: h will be separated by an incremental elements constitute a subset of sequences. In the sort process, the successive decrease of the increment, and finally reduced to one when h when an insertion sort, sort completed. Incremental sequence generally use: ht = 2t-1, 1 ≤ t ≤ [log2n], in which n is the length of sequence to be sorted.