DSSSB TGT CS Mock 02 – Question 131

Question:

Which of the following sorting algorithms has the best worst-case time complexity of \(O(n \log n)\) and is also stable?

निम्नलिखित में से किस सॉर्टिंग एल्गोरिदम की वर्स्ट-केस समय जटिलता \(O(n \log n)\) होती है और वह स्थिर (Stable) भी है?

Options:

  • Merge Sort
  • Quick Sort
  • Heap Sort
  • Selection Sort
  • मर्ज सॉर्ट (Merge Sort)
  • क्विक सॉर्ट (Quick Sort)
  • हीप सॉर्ट (Heap Sort)
  • सिलेक्शन सॉर्ट

Correct Answer: a)

Explanation:

Merge Sort has worst-case, average-case, and best-case time complexity of \(O(n \log n)\) and maintains the relative order of identical elements (stable). Quick Sort has \(O(n^2)\) worst case, and Heap Sort is not stable (Option a).

मर्ज सॉर्ट की सभी स्थितियों में समय जटिलता \(O(n \log n)\) होती है और यह एक स्थिर (Stable) सॉर्टिंग एल्गोरिदम है (विकल्प a)।

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top