1.

Which of the following is an advantage of cycle sort?(a) it can sort large arrays efficiently(b) it has a low time complexity(c) it requires minimal write operations(d) it is an adaptive sorting algorithmThis question was addressed to me by my school teacher while I was bunking the class.My doubt stems from Sorting topic in portion Sorting of Data Structures & Algorithms II

Answer»

Right choice is (c) it REQUIRES minimal write operations

The EXPLANATION is: Cycle sort is a slow sorting algorithm as compared to quick sort, merge sort etc. and is ALSO not adaptive. But it offers an advantage that it PERFORMS minimal write operations which can be very useful in a situation where the write operation is expensive.



Discussion

No Comment Found

Related InterviewSolutions