go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  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:

  •  


     
    Powered by ForumEasy © 2002-2022, All Rights Reserved. | Privacy Policy | Terms of Use
     
    Get your own forum today. It's easy and free.