•We can stop when the
unsorted side has just one number, since that number
must be the largest number.
[0][1][2][3][4][5]
Sorted side
Unsorted side
Selection Sort
And now the
sorted side has five elements.
In fact, once
the unsorted side is down to a single element, the sort is completed. At this
point the 5 smallest elements are in the sorted side, and so the the one
largest element is left in the unsorted side.