📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!

  • google app store apple app store
  • ✖

      Question

      Which of the following sorting algorithms has the BEST

      average-case time complexity?
      A Bubble Sort — O(n²) Correct Answer Incorrect Answer
      B Insertion Sort — O(n²) Correct Answer Incorrect Answer
      C Selection Sort — O(n²) Correct Answer Incorrect Answer
      D Merge Sort — O(n log n) Correct Answer Incorrect Answer
      E Gnome Sort — O(n²) Correct Answer Incorrect Answer

      Solution

      Merge Sort consistently achieves O(n log n) in all cases (best, average, worst) using divide-and-conquer. Quick Sort also averages O(n log n) but has O(n²) worst case. Bubble, Insertion, and Selection Sort are all O(n²) average which are inefficient for large datasets.

      Practice Next

      Relevant for Exams:

      ask-question