Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> if size of the universe of values counts as a constant

But of course, that is cheating.



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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: