- Algorithm:
Move entries more than one position at a time by h-sorting the array.
How to h-sort an array? Insertion sort, with stride length h.
Proposition. A g-sorted array remains g-sorted after h-sorting it.

- Complexity:
Proposition. The worst-case number of compares used by shellsort with
the 3x+1 increments is O(N3/2)\mathcal{O}(N^{3/2})O(N3/2).
Property. Number of compares used by shellsort with the 3x+1 increments is at most by a small multiple of N times the # of increments used.
611

被折叠的 条评论
为什么被折叠?



