1.

Which of the following sorting algorithm is NOT stable?(a) Quick sort(b) Cocktail sort(c) Bubble sort(d) Merge sortThe question was asked at a job interview.The doubt is from Sorting topic in section Sorting of Data Structures & Algorithms II

Answer» RIGHT CHOICE is (a) Quick sort

Easy explanation - Out of the given options quick sort is the only algorithm which is not stable. Cocktail sort LIKE BUBBLE sort is a stable sorting algorithm.


Discussion

No Comment Found

Related InterviewSolutions