Sort primes ascending and composites descending
Filed under Sirion
The question
Reorder an array in-place so prime numbers are in ascending order and composite numbers are in descending order.
No write-up yet. Related questions below have one.
Related Sirion questions
Collected from public candidate posts and coding forums. Updated Nov 2026.