"he program SHELLSOR.CPP uses the sequence
N/2, N/4, N/8, . . ., 4, 2, 1
as the diminishing increments used in the various iterations of the Shell sort algorithm. However, this sequence has been shown to be a relatively poor choice in the general case and can even lead to a worst case performance of O(n2)."
Mystery solved?
N/2, N/4, N/8, . . ., 4, 2, 1
as the diminishing increments used in the various iterations of the Shell sort algorithm. However, this sequence has been shown to be a relatively poor choice in the general case and can even lead to a worst case performance of O(n2)."
Mystery solved?