Heap Sort

1. What is the time complexity of removing the root from a heap when the heap property must be restored afterward?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

2. How many root-removal operations are required to remove all 10 elements from a heap if one element is removed at each operation?

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

3. After removing the root from a binary heap, which element is typically moved to the root position before the heap property is restored?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

4. In a max-heap, which element is obtained when the root is removed?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

5. What is the purpose of restoring the heap property after removing the root?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

6. If a heap contains nn elements, what is the height of the heap in terms of nn?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

7. During repeated root removals in Heap Sort with a max-heap, where is the removed maximum element placed in the array?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

8. Which heap operation is primarily used to restore a heap after its root has been replaced?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

9. If each root removal from a binary heap takes O(logn)O(\log n) time and nn elements are removed, what is the overall order of the repeated removals?
Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation

Explanation