1.

Which of the following sorting algorithm is NOT stable?(a) Introsort(b) Brick sort(c) Bubble sort(d) Merge sortThis question was addressed to me in unit test.My enquiry is from Sorting topic in portion Sorting of Data Structures & Algorithms II

Answer»

Right option is (a) Introsort

Explanation: Out of the GIVEN options introsort is the only algorithm which is not stable. As it MAY USE QUICK sort in some CASE to perform sorting which is itself not stable. Thus stability of introsort is not guaranteed.



Discussion

No Comment Found

Related InterviewSolutions