 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
Examines
the entire list to select the smallest element;
|
|
|
places
that element where it belongs (with array index 0)
|
|
|
| • |
Examines
the remaining list to select the smallest element
|
|
|
from
it; places that element where it
belongs (array index
|
|
1)
|
|
|
| • |
Continues
process until only 2 items remain in unsorted
|
|
|
portion
|
|
|
| • |
Examines
the last 2 remaining list elements to select the
|
|
|
smallest
one; place that element where it
belongs in the
|
|
|
array
(index numItems-2, leaving the last item in its
|
|
|
proper
place as well.
|
|