PS3 FAQ
- What is the "top-down algorithm" in 3 (a)?
That's the algorithm we talked about in class, using
Heapify-Up
to insert each key. - What is the input to the bottom-up algorithm?
The algorithm takes as input an array that contains the keys given, in that order.
- What is "conceptual complexity" referred to in 3
(c)?
"Conceptual complexity" is how hard each algorithm is to understand and implement.
- How can I analyze the runtime of the bottom-up algorithm?
One way that may help you is to kind of visualize which
elements you're "touching" in each iteration of
the for
and the while
loop. So, draw a
heap and mark which elements are looked at during processing.