3 ms·
But how would you detect that a station name is colliding or not colliding? With a hash set?
by posix86 3y ago
But how would you detect that a station name is colliding or not colliding? With a hash set?
- viraptor 3y agoSearch for cuckoo hashing. It's a whole thing for data structures.
- posix86 3y agoCuckoo doesn't aid in detecting collisions, the algorithm is about what happens IF a collision is found. The whole reason we're hashing in the first place is to not have to linearly compare station names when indexing. In other words: Cuckoo is a strategy to react to the case if two values map to the same hash. But how to know weather you have two different values, or two of the same, if they have an identical hash?