1. 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.

Shellsort

  1. 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}).
    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.

相关文章:

  • 2021-08-22
  • 2021-05-14
  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
  • 2021-10-29
  • 2021-08-12
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-27
  • 2022-03-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-21
相关资源
相似解决方案