3 ms·
1 billion rows, 500 unique values... It becomes very possible to find an instance of each unique value, then runtime-design a hash algorithm where those 500 va
by londons_explore 3y ago
1 billion rows, 500 unique values...
It becomes very possible to find an instance of each unique value, then runtime-design a hash algorithm where those 500 values don't collide.
Java allows self modifying code after all (and this challenge also allows native code, which can also be compiled-at-runtime)
- spullara 3y agoYou have to compare the keys in order to figure out if you have a hash collision or a new key. Without first scanning the entire file to know what the list of keys are there isn't a way around it. Even determining that list of keys involves doing key comparisons for every row.