What is the worst-case time complexity of Merge Sort?

Options

  • A. O(n)
  • B. O(n log n)
  • C. O(n^2)
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

B. O(n log n)

Detailed Explanation

The worst-case time complexity of Merge Sort is O(n log n). The algorithm divides the input into approximately two equal parts, creating about log n levels of recursion. At every level, the merging operation processes all n elements, giving O(n) work per level. Therefore, the total complexity is O(n log n). Unlike Quick Sort, Merge Sort maintains O(n log n) time complexity even in its worst case.