Which of the following is an adaptive sorting algorithm?

Which of the following is an adaptive sorting algorithm?
A. binary insertion sort
B. merge sort
C. heap sort
D. selection sort
 
Answer: a
Explanation: Binary insertion sort is an adaptive algorithm. It is because the time complexity of the algorithm improves when the input array is almost sorted.
 

Tìm kiếm

Back
Top