Quicksort outperforms Heapsort in practice. Mergesort is the only stable one of the 3 (in plain vanilla implementations). So it's either quicksort or mergesort that'd get used depending on the situation at hand (in-place in memory or external sorting etc.,)
So is there ever a case where the heap data structure is indeed used for sorting? No matter how much I 'Google' or try to come up with applications, almost always one chooses merge/quick-sort over heapsort. I've never encountered a case where heap sort is actually used in my professional life either. What would actually be a good use-case for heapsort in practice (if at all), out of curiosity?
Some benefits off the top of my head (will amend this list after I do some more research:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With