quick, heap, and merge sorts comparison
On the basis of their actual run-time formulas (not just their O-notation), what is the order of the average case running times of Heap sort, Merge sort, and Quciksort from fastest to slowest? I know that Heap sort is faster than merge sort, so the real quest is, which is fastest between Merge sort and Quicksort?
Re: quick, heap, and merge sorts comparison
And yet another.....
Don't you believe in doing any honest work yourself. Write some code, measure the results, analyze the various standard implementations,
Re: quick, heap, and merge sorts comparison
oh i agree w/ you 100%, but it would be impractical to do so considering its finals week and im trying to cram for finals ... thanks for your smart *** remark, though ...it did me a lot of help.
Re: quick, heap, and merge sorts comparison
So, perform the experiment after finals. Unless, this is really a schoolwork related question.
Viggy
Re: quick, heap, and merge sorts comparison
This is really dependant on the data and how they're ordered in the (unsorted) array (as well as factors such as computer speed, compiler used, language used, optimizations used, the mood you're in when you're writing the test cases, etc.). As a (very) general case, quicksort is generally faster out of the 3, however it does have a worst-case running-time so it's also the slowest of the three.
Re: quick, heap, and merge sorts comparison
To MrViggy, this is for finals. And to cma, thank you.