3 ms·
I wouldn't expect a hash map that uses linear probing to wait until it's full (or even nearly full) before increasing the size of the table. Doing a linear scan
by usefulcat 5y ago
I wouldn't expect a hash map that uses linear probing to wait until it's full (or even nearly full) before increasing the size of the table. Doing a linear scan on a hash table which is both nearly full and very large would be quite bad.
- munchbunny 5y agoNormally I wouldn't expect it either, but if you know it caps out at single-digit numbers of elements, then it's not the worst idea. I'd still just use a plain array, but my point was that hash maps aren't necessarily big and unwieldy.