 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
Therefore,
it might be better to chose a pivot
|
|
|
from
the center of the list, hoping that it will
|
|
|
divide
the list approximately in two.
|
|
|
|
– |
If
you are sorting a list that is almost in sorted
|
|
|
order...this
would require less data movement!
|
|
|
|
– |
At
each step in the partition function, we need to
|
|
examine
one element in the unknown region,
|
|
|
determine
how it relates to the pivot point, and
|
|
|
place
it in one of the two regions (< or =>).
|
|
|
|
– |
think
of this as making piles...
|
|