Generalization of insertion sort that allows exchanges of far-apart elements using diminishing gap sequences.