Since counting sort becomes efficient when there are many duplicates, the naive approach would be to separate each digit of the ID code. Turns out that in 10 million idCodes, there are way too many ...