45
•
Start by finding
the
smallest
entry.
•
Swap the
smallest entry
with the
first
entry
.
[0]
[1]
[2]
[3]
[4]
[5]
Selection Sort
...like this.
The smallest element is now at the front of the array, and we have taken one small step toward producing a sorted array.