Question discussion

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

1976Medium DSSSB TGT Computer Science 0 replies 1 views
0

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

  • AQuick sort
  • BBubble sort
  • CMerge sort
  • DInsertion sort
Correct answer: C

Explanation

Merge sort always divides the list into halves and merges in linear time, so its worst case is O(n log n); quick sort degrades to O(n²).

Discussion 0

Nobody has replied yet. Start the discussion!