 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
Also notice that even with O(N2) comparisons there
|
|
|
are
only O(N) moves.
|
|
|
|
– |
Therefore,
the selection sort could be a good choice over
|
|
|
other
methods when data moves are costly but
|
|
|
comparisons
are not.
|
|
|
|
– |
This
might be the case when each data item is large (i.e.,
|
|
|
big
structures with lots of information) but the key is
|
|
|
short.
|
|
|
|
– |
Of
course, don't forget that storing data in a linked list
|
|
|
allows
for very inexpensive data moves for any
|
|
|
algorithm!
|
|