Putting things in orderLesson 2 of 14Free preview
Insertion sort: slide each order into place
A nearly sorted list takes 9 comparisons and 2 shifts. Each shift fixes one inversion.
Putting things in orderLesson 2 of 14Free preview
A nearly sorted list takes 9 comparisons and 2 shifts. Each shift fixes one inversion.