Block swap
= Block swap
Exchange two equally long disjoint segments of an <array>, preserving the order within each segment. Applying one <swap> at each corresponding offset exchanges length-$n$ blocks in $n$ swaps and constant auxiliary storage. Disjointness ensures that an earlier swap does not overwrite an original value needed by a later pair.