Tech-Interview-Cheat-Sheet icon indicating copy to clipboard operation
Tech-Interview-Cheat-Sheet copied to clipboard

Merge sort space is O(n) not O(1)

Open rszymula opened this issue 3 years ago • 2 comments

Need to update merge sort space complexity to O(n)

It was odd to me that merge sort stats here are "better" than quick sort in every way - whereas Quicksort is used everywhere in practice, not Mergesort.

Why is QuickSort favourable over MergeSort in practice? https://www.reddit.com/r/computerscience/comments/6krpz7/why_is_quicksort_favourable_over_mergesort_in/

Quicksort is used bc is has better space complexity than merge. Merge should be O(n)

Screen Shot 2021-04-04 at 8 39 07 AM

rszymula avatar Apr 04 '21 13:04 rszymula

just noticed the same. PLease update

sharifsonic avatar Sep 24 '21 14:09 sharifsonic

Happy to accept pull requests

tsiege avatar Apr 09 '22 16:04 tsiege