πŸ“’ 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

      worst-case time complexity?
      A QuickSort Correct Answer Incorrect Answer
      B MergeSort Correct Answer Incorrect Answer
      C BubbleSort Correct Answer Incorrect Answer
      D InsertionSort Correct Answer Incorrect Answer
      E SelectionSort Correct Answer Incorrect Answer

      Solution

      MergeSort has a guaranteed O(n log n) worst-case complexity, unlike QuickSort which can degrade to O(nΒ²).

      Practice Next
      More Algorithms Questions
      ask-question