26 votes 26 votes A sorting technique is called stable if it takes $O (n \log n)$ time it maintains the relative order of occurrence of non-distinct elements it uses divide and conquer paradigm it takes $O(n)$ space Algorithms gate1999 algorithms sorting easy + – Kathleen asked Sep 23, 2014 • edited Nov 13, 2017 by kenzou Kathleen 9.3k views answer comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments ankit3009 commented Jan 8, 2021 reply Follow Share Nice explaination :) 0 votes 0 votes adeemajain commented Feb 9, 2021 reply Follow Share This video explains all 3 types and classifies all sorting algos 0 votes 0 votes adeemajain commented Feb 9, 2021 reply Follow Share watch gate for geeks video added in comment it may help 0 votes 0 votes Please log in or register to add a comment.
Best answer 30 votes 30 votes Correct Option: B If it maintains the relative order of occurrence of non-distinct elements. (from definition of stable sorting) Arjun answered Sep 24, 2014 • edited May 12, 2021 by soujanyareddy13 Arjun comment Share Follow See all 0 reply Please log in or register to add a comment.
17 votes 17 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. Ref: https://stackoverflow.com/questions/1517793/what-is-stability-in-sorting-algorithms-and-why-is-it-important Prabhat Kumar Sing 1 answered Jan 2, 2018 Prabhat Kumar Sing 1 comment Share Follow See all 0 reply Please log in or register to add a comment.