Heap-Sort-Quiz1
Heap-Sort-Quiz1
6. How does Heap Sort handle the largest element in the heap?
A. Moves it to the root of the heap.
B. Swaps it with the last element of the heap.
C. Deletes it from the heap.
D. Leaves it in its current position.
10. What happens after the root element of the heap is swapped with the last element?
A. The heap is sorted.
B. The heap is heapified, excluding the swapped element.
C. The heap size increases.
D. The heap becomes a Min Heap.
11. Sort the array [7, 2, 9, 4, 1] using Heap Sort. What is the sorted array?
A. [7, 9, 4, 2, 1]
B. [9, 7, 4, 2, 1]
C. [1, 2, 4, 7, 9]
D. [2, 4, 7, 9, 1]
16. Heap sort is ____ as the constants are higher compare to merge sort
A. Simplicity
B. Costly
C. Unstable
D. Inefficient
A. Simplicity
B. Unstable
C. Stability
D. Limbics
18. Heap sort is ______because of the high constants in the time complexity
A. Simplicity
B. Time Complexity
C. Inefficient
D. Efficiency
19. It is simpler to understand than other equally efficient sorting algorithms because it does
not use advanced computer science concepts such as recursion.
A. Simplicity
B. Limbics
C. Bouquet
D. Efficiency
A. Costly
B. Inefficient
C. Limbics
D. Unstable