Open In App

GATE | GATE CS 1999 | Question 12

A sorting technique is called stable if:

(A)



It takes O(n*log(n)) time

(B)



It maintains the relative order of occurrence of non-distinct elements

(C)

It uses divide and conquer paradigm

(D)

It takes O(n) space

Answer: (B)
Explanation:

The correct option is B it maintains the relative order of occurrence of non-distinct elements
A sorting algorithm is called stable if it keeps elements with equal keys in the same relative order in the output as they were in the input.

Quiz of this Question
Please comment below if you find anything wrong in the above post

Article Tags :