4 ms·
They go to the same bucket because their hash *mod the size of the top array* collides.
by tubs 2y ago
They go to the same bucket because their hash *mod the size of the top array* collides.
- tialaramex 2y agoThis whole sub-thread is about the case where the entire hash collides Changing which bits we use changes nothing for this problem case.
- tubs 2y agoI see what you mean here, sorry. I guess I'd argue if you have 20 items whose full hash collides then something is pretty seriously wrong with the hashing algorithm - raise an error/exception/panic/(whatever is appropriate for the situation) and surface it.