55
•
The array is now
sorted.
•
We repeatedly
selected
the
smallest element,
and moved this
element to the front
of the unsorted
side.
[0]
[1]
[2]
[3]
[4]
[5]
Selection Sort
...The array is sorted.
The basic algorithm is easy to state and also easy to program.