 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
On
average, quicksort runs much faster
|
|
|
than
the insertion sort on large arrays.
|
|
|
| • |
In
the worst case, quicksort will require
|
|
|
roughly
the same amount of time as the
|
|
|
insertion
sort.
|
|
|
|
– |
If
the data is in a random order, the quicksort
|
|
|
performs
at least as well as any known sorting
|
|
|
algorithm
that involves comparisons.
|
|
|
|
– |
Therefore,
unless the array is already ordered --
|
|
the
quicksort is the best bet!
|
|