Which of the following sorting algorithm is not in-place?

Thê Hy

New member
Which of the following sorting algorithm is not in-place?
A. insertion sort
B. tim sort
C. quick sort
D. intro sort
 
Answer: b
Explanation: Tim sort is not an in-place sorting algorithm as it requires auxiliary space. It is because it requires to merge sorted runs which requires a third array of the size equal to the sum of the two runs.
 

Tìm kiếm

Back
Top