What is the advantage of comb sort over merge sort?

What is the advantage of comb sort over merge sort?
A. Comb sort is an in place sorting algorithm
B. Comb sort is a stable sorting algorithm
C. Comb sort is more efficient
D. It has no advantage
 
Answer: a
Explanation: Comb sort does not require auxiliary space for manipulating input so it is an in place sorting algorithm but merge sort does require O(n) of auxiliary space which makes comb sort better in terms of space complexity.
 

Tìm kiếm

Back
Top