01How it works
Run insertion sort on elements spaced a large "gap" apart, then shrink the gap and repeat. Early passes move items long distances cheaply, and the final gap-1 pass is a nearly-sorted insertion sort — which is the case where insertion sort excels.