Hacker News new | ask | show | jobs
by amelius 660 days ago
> if size of the universe of values counts as a constant

But of course, that is cheating.

1 comments

I mean, it depends. In Unicode normalization you have to do a stable sort of an arbitrary number of values (code points) that can only ever map to a small finite number ( < 256) of sort keys (combining classes). Insertion sort is the best choice for ordinary inputs, but for adversarial ones a counting sort is probably your best bet.