Even though Quick Sort has a worst case of O(n^2) complexity which is slower than the worst case which is O(nlogn) for merge sort…why is quick sort is better than Merge sort in practice?

# Why Quick Sort is better than Merge Sort?

**pruth**#2

Because merge sort has O(n) space complexity and Quick Sort has O(1) space complexity in all the cases.

Therefore in best and average case you can get O(nlogn) time complexity and O(1) space complexity using quick sort

**Debanjan**#3

This is a very researched problem. (This is often asked in elementary level DS interviews too).

Please see here and here for more information.

**betlista**#5

You have to word you answer properly, because while you have let say array with n elements in memory, space complexity cannot be O(1)…

@Debanjan:Thnx very much.The provided links have been very useful and gave me a clear understanding