|
Why is mergesort better than quicksort? |
|
Subject: Why is mergesort better than quicksort?
Author: Alex_Raj
In response to: Why is quicksort better than mergesort?
Posted on: 12/28/2013 01:57:26 AM
Two major reasons:
Mergesort is good for external sorting where memory can be constraint. Mergesort is in a perfect position to benefit from parallel computing.
>
> On 12/28/2013 01:52:41 AM Alex_Raj wrote:
Two major reasons: The real-world data most likely has some partial data sorted in nature. Quicksort's inner loop can significantly benefit from this by skipping swaps for those data. Quicksort is an in-place sort which uses less storage and hence less disk/memory hits.
References:
|
|
|
|