 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
The
good news is that if the list is already
|
|
|
|
sorted
in ascending order and the pivot is the
|
|
|
smallest
#, then we actually do not perform
|
|
|
|
any
moves.
|
|
|
| • |
But,
if the list is sorted in descending order
|
|
|
|
and
the pivot is the largest, there will not
|
|
|
|
only
be a large number of un-necessary
|
|
|
|
comparisons
but also the same number of
|
|
|
|
moves.
|
|