79424620

Date: 2025-02-09 08:48:24
Score: 1
Natty:
Report link

The existence of this question thread made me misunderstood in these years, believing the "lack of stable-sort" in Swift.

However, at least Swift 6 always sort things stably:

The sorting algorithm is guaranteed to be stable. A stable sort preserves the relative order of elements for which areInIncreasingOrder does not establish an order.

Still, if there's an early version of Swift 5 has lack of this support, please leave me a comment.

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Shiki Suen