1.

Which of the following sorting techniques is stable?(a) quick sort(b) counting sort(c) heap sort(d) selection sortI have been asked this question in a national level competition.My doubt stems from Sorting topic in section Sorting of Data Structures & Algorithms II

Answer»

Correct answer is (b) COUNTING sort

For explanation: Counting sort is an example of stable SORTING algorithm as the elements with IDENTICAL values APPEAR in the same order in the output array as they were in the input array.



Discussion

No Comment Found

Related InterviewSolutions