A sorting technique is called stable if

2017

A sorting technique is called stable if

Answer: C. Relative order of occurrence of non-distinct elements is maintainedA 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…

  1. A.

    If it takes O(n log n) time

  2. B.

    It uses divide and conquer technique

  3. C.

    Relative order of occurrence of non-distinct elements is maintained

  4. D.

    It takes O(n) space

Attempted by 1007 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.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…