Heap Sort
1. Which of the following arrays represents a valid min-heap after the insert-heap step is performed?
2. What do you think is the complexity of inserting into a heap using this naive insert heap method? (Consider if it can be further improved)
3. In a min-heap, where should a newly inserted element initially be placed before restoring the heap property?
4. What operation is used to restore the heap property after inserting a new element?
5. If the height of a binary heap is , what is the worst-case time complexity of standard heap insertion using sift-up?
6. Why is the complete-tree property important during heap insertion?
7. Suppose a min-heap contains the elements . If is inserted and sift-up is performed, what will be the new root?
8. Which statement best distinguishes the naive insert-heap method from the standard efficient heap insertion?
9. If elements are inserted one at a time into a heap using the standard insertion method, what is the worst-case upper bound for all insertions?