Question discussion

[Added later – this question is not part of the original paper]Which of the following sorting algorithms is based on the divide-and-conquer…

359448Medium DSSSB TGT Computer Science 0 replies 0 views
0

[Added later – this question is not part of the original paper]

Which of the following sorting algorithms is based on the divide-and-conquer approach and has O(n log n) time complexity in all cases?

  • ABubble sort
  • BInsertion sort
  • CMerge sort
  • DSelection sort
Correct answer: C

Explanation

Merge sort divides the array into halves, sorts them and merges them, taking O(n log n) time in best, average and worst cases.

Discussion 0

Nobody has replied yet. Start the discussion!