Which of the following sorting algorithms guarantees O(n log n) time in the worst case?

13 views
  • Quick Sort
  • Merge Sort (Correct Answer)
  • Bubble Sort
  • Insertion Sort

Explanation

Merge Sort divides the array recursively and merges sorted halves, guaranteeing O(n log n) in all cases. Quick Sort can degrade to O(n²) in worst case, and Bubble/Insertion Sort are O(n²) worst case.

Comments (0)

No comments yet. Be the first to comment!

Want to practice more?

Explore thousands of MCQs across every exam category on Exams Nepal.

Find More MCQs