3 ms·
"Surely you can have the hash function be O(1) by only looking at a subsets of characters something like" I seem to remember that in the very early days of Jav
by arethuza 4y ago
"Surely you can have the hash function be O(1) by only looking at a subsets of characters something like"
I seem to remember that in the very early days of Java the standard hashing method for strings only looked at a small prefix - turns out that very common use case was to be storing URLs as keys which, of course, mostly start with the same letters...