Insertion sort

Put the numbers in order from smallest to largest. Think of sorting a hand of cards. Pick up the next card and slip it into its place among the cards you have already sorted.

Lift the next number. While its left neighbor is larger, slide the neighbor right. Put the number in your hand into the gap.

The sorted part on the left grows by one number each time.

An already sorted row takes O(n) time. A row in reverse order needs the most shifts and takes O(n²) time.