code_golf
Code Golf mac 10mo ago 83%

Cyclically Sort a List

codegolf.stackexchange.com

Given a list of Integers greater than zero, Sort each of the unique values in ascending order, then repeat the process on the remaining duplicate values and append.

Example:

[1,5,2,2,8,3,5,2,9] ==> [1,2,3,5,8,9,2,5,2]

4
0
Comments 0