Computer Science, asked by nithwik3332, 1 year ago

Merge sort time complexity for sorted and unsorted

Answers

Answered by Anonymous
1
O(n log n) is time complexity of merge sort but can't read about sorted and unsorted complexities
Answered by Anonymous
2

Complexity Analysis of Merge Sort

  • Time complexity of Merge Sort is O(n*Log n) in all the 3 cases (worst, average and best) as merge sort always divides the array in two halves and takes linear time to merge two halves.

  • It requires equal amount of additional space as the unsorted array.
Similar questions