+ 1

Merge sort vs quick sort for array

Hi Can any one share thought why one should go for merge sort over quick sort in case of larger array size ? Both are having n log n... How length of array metter for choice?

26th Mar 2021, 1:49 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
4 odpowiedzi
+ 1
Quicksort has a worst case O(N²) complexity. Mergesort has a worst case O(NlogN) complexity. Which method is better depends on many things though.
26th Mar 2021, 2:09 PM
Luk
Luk - avatar
28th Apr 2021, 1:21 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
0
Ketan Lalcheta please can you show me some good references on your statement, "merge sort over quick sort in case of large arrays". I was also searching for something similar.
27th Apr 2021, 8:03 PM
Md. Faheem Hossain
Md. Faheem Hossain - avatar