Merge sort
mediumNothing happens on the way down - all the work is in the merges on the way up. O(n log n) in every case including adversarial input, which is a guarantee quicksort cannot make.
Best
O(n log n)Average O(n log n)Worst O(n log n)Space O(n)StableNeeds extra memoryLoading the merge sort engine…