Merge sort time complexity for sorted and unsorted
Answers
Answered by
1
O(n log n) is time complexity of merge sort but can't read about sorted and unsorted complexities
Answered by
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
Math,
8 months ago
Chemistry,
8 months ago
Social Sciences,
8 months ago
Psychology,
1 year ago
Math,
1 year ago
Math,
1 year ago