Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Sort()

MeirikMeirik Posts: 1Member
Hi i just whant to know what algoritem they are using in Array.Sort(). It's fast.

Comments

  • ing_gigioing_gigio Posts: 31Member
    : Hi i just whant to know what algoritem they are using in Array.Sort(). It's fast.
    :

    I cite literally 2 sentences from the .Net documentation (this was found in the description Array.Sort() method)

    "
    This method uses the QuickSort algorithm. This is an O(n ^2) operation, where n is the number of elements to sort, with an average of θ(n log n).

    This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
    "
Sign In or Register to comment.