Editorial for SAC '22 Code Challenge 3 P3 - Bob Sort
Submitting an official solution before solving the problem yourself is a bannable offence.
First, find by iterating across the array.
Second, create an array of pairs that store the value modulo the respective round (e.g., for round 1, mod the value by ; for round 2, mod the value by ; etc.).
Third, sort that array by the modulo value using a custom comparator or built-in functions.
Finally, output that round and repeat the second and third steps until you have reached the final round.