Insertion sort for a numeric array.