A sorting technique is called stable if
2017
A sorting technique is called stable if
- A.
If it takes O(n log n) time
- B.
It uses divide and conquer technique
- C.
Relative order of occurrence of non-distinct elements is maintained
- D.
It takes O(n) space
Attempted by 545 students.
Show answer & explanation
Correct answer: C
A sorting algorithm is stable if it preserves the relative order of equal elements after sorting. This means that if two items have the same key, their original sequence remains unchanged in the sorted output.