Q. In which scenario does Heap Sort perform better than Quick Sort?
-
A.
When the array is nearly sorted
-
B.
When the array is large
-
C.
When memory usage is a concern
-
D.
When the array is small
Solution
Heap Sort performs better than Quick Sort when memory usage is a concern, as it is an in-place sorting algorithm.
Correct Answer:
C
— When memory usage is a concern
Learn More →
Q. What is the primary advantage of using Quick Sort over other sorting algorithms?
-
A.
Simplicity of implementation
-
B.
Better average-case performance
-
C.
Stability
-
D.
Lower memory usage
Solution
The primary advantage of using Quick Sort is its better average-case performance.
Correct Answer:
B
— Better average-case performance
Learn More →
Showing 1 to 2 of 2 (1 Pages)