Quiz 6, Thursday, 12/4

(20 minutes. Open notes)


  1. Consider a max-heap with 17 elements. Suppose that the elements have distinct priorities. We know the element with highest priority occurs in slot 0 of the heap array.
    1. What about the element with second-highest priority? Which are possible slots for this element?
    2. What about the element with smallest priority? Which are possible slots for this element?

  2. Draw all possible min-heaps with the following 6 elements:
    	3    1   18   11   12   16.
    
    Take the numbers above to be the priorities of the elements.