Building a Heap from a List

Let A be an n element list. We will turn A into a heap (in place).


Recall that tex2html_wrap_inline226 is 2i and tex2html_wrap_inline230 is 2i+1.

Also, tex2html_wrap_inline234 performs the down-heapify action starting at node i.

next up previous
Next: Build-Heap Analysis Up: HEAPS Previous: Up-Heapify