Community & Support
Learn
Marketplace
Menu
Menu
🎉Community Raffle - Win $25
An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win
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
Groups
Best Of
the sort operator uses the Collections.sort() method from Java. From the Java API it says: So yes, the sorting is stable.
Best,
Nils