Question discussion

A sorting algorithm is called stable if

2928Easy DSSSB TGT Computer Science 0 replies

A sorting algorithm is called stable if

  • AIt takes O(n log n) time
  • BIt maintains relative order of occurrence of non-distinct elements
  • CIt uses divide and conquer paradigm
  • DIt takes linear time
Correct answer: B

Explanation

A stable sort keeps equal elements in their original relative order.

Discussion 0

Nobody has replied yet. Start the discussion!