4 Comparison with merge sort

Quicksort has two advantages over recursive merge sort for arrays:

However, it should be noted that merge sort has its advantages. The most important one is that merge sort has a predictable time and space complexity. If predictability and worst case scenarios are important, then merge sort is better than quick sort.

In addition, quick sort relies on efficient random access (like array indexing). This means that it does not work well for sequential data organization. This even include random access files. This is because even though the concept of random access files suggests that random access is efficient, in practice it is seldom the case.