3 ms·
Quicksort is not simple if you have to build in an entire other sorting algorithm as a failsafe. And merge sort is often faster, especially if the comparison f
by TheLoneWolfling 13y ago
Quicksort is not simple if you have to build in an entire other sorting algorithm as a failsafe.
And merge sort is often faster, especially if the comparison function is relatively expensive.
- RogerL 13y agoYes, sometimes, but it also uses more memory. In practice, with real problems, quicksort wins with in-memory sorting, and mergesort wins with too big for memory data sets.