 |
 |
 |
 |
 |
 |
 |
 |
| • |
A
heapsort uses a heap to sort a list of items
|
|
|
|
that
are not in any particular order.
|
|
|
| • |
The
first step of the algorithm transforms
|
|
|
|
the
array into a heap.
|
|
|
| • |
We do
this by inserting the numbers into the
|
|
|
heap
and having them trickle up...one
|
|
|
|
number
at a time.
|
|