Community & Support
Learn
Marketplace
Menu
Menu
Home
›
Discussions
›
Community Q&A
[SOLVED] Does the Sort operator perform a stable sort?
tennenrishin
New Altair Community Member
May 28, 2013
Updated
Nov 5, 2024
by
Jocelyn
Does the Sort operator perform a stable sort?
Find more posts tagged with
AI Studio
All Replies
Sort by:
Sort by
Oldest
▾
1 - 2 of 2
↑
1
↑
Nils_Woehler
New Altair Community Member
May 29, 2013
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
tennenrishin
New Altair Community Member
OP
May 29, 2013
Thank you Nils!
Quick Links
All Categories
Recent Discussions
Activity
Unanswered
日本語 (Japanese)
한국어(Korean)
the sort operator uses the Collections.sort() method from Java. From the Java API it says: So yes, the sorting is stable.
Best,
Nils