Which of the following sorting algorithms has a worst-case time complexity of O(n^2)?

16 views
  • Quick sort
  • Merge sort
  • Insertion sort (Correct Answer)
  • Radix sort

Explanation

Answer: c) Insertion sort

Explanation: Insertion sort is a simple sorting algorithm that iterates through an array and inserts each element in its proper position. Its worst-case time complexity is O(n^2), which makes it inefficient for large data sets.

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