Diminishing increment sort as used by Shellsort provides
a simple and efficient sorting algorithm. This
algorithm improves on Insertion Sort by reducing the
number of inversions and comparisons made on the elements
to be sorted. It sorts an array ‘A’ with ‘n’ elements
by dividing it into subsequences and sorts the subsequences.
It is called diminishing increment sorting
because the increments continue to decrease from one
pass to the other until the last increment is 1.