The Selectionsort Algorithm
pFind the smallest element in the unsorted side. pSwap with the front of the unsorted side.
Sorted side
Unsorted side
[0]       [1]        [2]       [3]        [4]       [5] 
This small element is swapped with the number at the front of the unsorted side, as shown here...