Insertion Sort
The approach of Insertion Sort:
- Pick any item and insert it into its proper place in a sorted sublist
- repeat until all items have been inserted
-
An expanded version:
- consider the first item to be a sorted sublist (of one item)
- insert the second item into the sorted sublist, shifting items as necessary to make room to insert the new addition
- insert the third item into the sorted sublist (of two items), shifting as necessary
- repeat until all values are inserted into their proper position