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

Interestingly you need a hash function big enough to be unique for all data points with high probability, it doesn't take much to point out that this is at least O(log(n)) if all items are unique.

Also if items take up k bytes then the hash must typically be O(k), and both the hashing and radix sort are O(n k).

Really radix sort should be considered O(N) where N is the total amount of data in bytes. It can beat the theoretical limit because it sorts lexicographically, which is not always an option.



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

Search: