String Sorting by ASCII Primes
Filed under Newfold Digital
The question
Given a number N and a string S, sort the string such that letters with prime ASCII values come first in ascending order, followed by composite ASCII values in descending order.
No write-up yet. Related questions below have one.
Related Newfold Digital questions
Collected from public candidate posts and coding forums. Updated Nov 2026.