The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

[SOLVED] Does the Sort operator perform a stable sort?

tennenrishintennenrishin Member Posts: 177 Contributor II
edited November 2018 in Help
Does the Sort operator perform a stable sort?

Answers

  • Nils_WoehlerNils_Woehler Member Posts: 463 Maven
    Hi,

    the sort operator uses the Collections.sort() method from Java. From the Java API it says:

    This sort is guaranteed to be stable: equal elements will not be reordered as a result of the sort.
    So yes, the sorting is stable.

    Best,
    Nils
  • tennenrishintennenrishin Member Posts: 177 Contributor II
    Thank you Nils!
Sign In or Register to comment.