Merge sort is a straightforward divide-and-conquer sorting algorithm. It requires $O(n)$ extra memory, unlike quick sort. However, it guarantees $O(n \log n)$ time complexity even in the worst case.
1 | |
Merge sort is a straightforward divide-and-conquer sorting algorithm. It requires $O(n)$ extra memory, unlike quick sort. However, it guarantees $O(n \log n)$ time complexity even in the worst case.
1 | |