Mergesort uses extra space but quicksort requires little space. Quick sort is in-place sorting algorithm. In-place sorting means no additional storage space is needed to perform sorting. Merge sort requires a temporary array to merge the sorted arrays. it is not in-place giving Quick sort the advantage of space.
Worst Cases :
The worst case of quicksort O(n2) .It can be easily avoided with high probability by choosing the right pivot. obtaining the data in quick sort,its improvise the performance and becoming as efficient as Merge sort.
Locality of reference :
Quicksort having particular exhibits good cache locality and its make it faster than merge sort in any cases like in virtual memory environment. Merge sort is better for large data structures, Mergesort is a stable sort, while quicksort and heapsort.
Liked By
Write Answer
Why quicksort is better than mergesort ?
Join MindStick Community
You have need login or register for voting of answers or question.
Prakash nidhi Verma
22-Jun-2018Auxiliary Space :
Mergesort uses extra space but quicksort requires little space. Quick sort is in-place sorting algorithm. In-place sorting means no additional storage space is needed to perform sorting. Merge sort requires a temporary array to merge the sorted arrays. it is not in-place giving Quick sort the advantage of space.
Worst Cases :
The worst case of quicksort O(n2) .It can be easily avoided with high probability by choosing the right pivot. obtaining the data in quick sort,its improvise the performance and becoming as efficient as Merge sort.
Locality of reference :
Quicksort having particular exhibits good cache locality and its make it faster than merge sort in any cases like in virtual memory environment. Merge sort is better for large data structures, Mergesort is a stable sort, while quicksort and heapsort.