InterviewSolution
Saved Bookmarks
| 1. |
Which of the following is an example of an unstable sorting algorithm?(a) cycle sort(b) insertion sort(c) bubble sort(d) merge sortThis question was addressed to me in quiz.The origin of the question is Sorting in portion Sorting of Data Structures & Algorithms II |
|
Answer» CORRECT choice is (a) cycle sort Easiest explanation - Out of the given options only cycle sort is an UNSTABLE sorting algorithm. This implies that the RELATIVE position of equal valued ELEMENTS in the input and sorted array does not remain the same when we USE cycle sort. |
|