Q: Which of the following sorting algorithms is often used as a subroutine in other sorting algorithms?
-
A
Selection sort
-
B
Insertion sort
-
C
Merge sort
-
D
Quick sort
D
Answer:
D
Explanation:
Quick sort is often used as a subroutine in other sorting algorithms due to its efficiency and speed in sorting data. Its partitioning approach can be utilized in algorithms like introsort (a hybrid sorting algorithm), where it provides quick sorting for large datasets. While merge sort is also commonly used in hybrid approaches, quick sort is particularly noted for its versatility and performance in various contexts.
Related Topic:
Share Above MCQ