The Selectionsort Algorithm
p
Find the
smallest
element in
the unsorted
side.
p
Swap 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...