An insertion sort solution