Next:
Heapsort Construction
Up:
SORTING BY SELECTION
Previous:
SORTING BY SELECTION
Heap Sort
Restore-Heap(i):
where
is the height of the node i.
Construct Heap:
For
down to 1 Restore-Heap(i)
Heap Sort:
Construct Heap -
For
:=
down to
-
exchange
with
decrement heap size
Restore-Heap(
)
Time Complexity of deletion phase in Heap Sort
Subsections
Heapsort Construction
Heapsort: Recursive Construction
Priority Queue employing Heap
Sushil_Prasad 2014-09-25