+1 vote
in Data Structures & Algorithms II by (110k points)
Which of the following is not a stable sorting algorithm?

(a) Quick sort

(b) Cocktail sort

(c) Bubble sort

(d) Merge sort

I had been asked this question in an interview for job.

Query is from Sorting topic in section Sorting of Data Structures & Algorithms II

1 Answer

+1 vote
by (614k points)
selected by
Best answer
Right answer is (a) Quick sort

The explanation is: Out of the given options quick sort is the only algorithm which is not stable. Merge sort is a stable sorting algorithm.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.