+12 votes
1.3k views

A sorting technique is called stable if

1. it takes $O (n \log n)$ time
2. it maintains the relative order of occurrence of non-distinct elements

3. it uses divide and conquer paradigm

4. it takes $O(n)$ space

asked
edited | 1.3k views

## 3 Answers

+16 votes
Best answer

(B) If it maintains the relative order of occurrence of non-distinct elements.

(from definition of stable sorting)

answered by Veteran (342k points)
edited by
+4 votes

Answer (B)

A sorting algorithm is said to be stable if two objects with equal keys appear in the same order in sorted output as they appear in the input array to be sorted. Some sorting algorithms are stable by nature like Insertion sort, Merge Sort, Bubble Sort, etc. And some sorting algorithms are not, like Heap Sort, Quick Sort, etc.

answered by (209 points)
+2 votes
Ans: B
answered by Loyal (7k points)
Answer:

+14 votes
1 answer
1
+12 votes
8 answers
2
+12 votes
2 answers
3