Insertion sort is a basic algorithm for sorting permutations: it repeatedly cuts out one element and inserts it at its place among the elements sorted so far.
It sorts every permutation of length $n$ with at most $n-1$ such moves, and some permutations cannot be sorted with fewer ...
more >>>