2 ms·
No, as the table fills up, you start to get clashes, where two keys hash to the same value. There are various ways to handle that - rehashing and trying again,
by Animats 10y ago
No, as the table fills up, you start to get clashes, where two keys hash to the same value. There are various ways to handle that - rehashing and trying again, linked lists - all of which take you below O(1). See [1].
[1] https://en.wikipedia.org/wiki/Hash_table#Collision_resolution https://en.wikipedia.org/wiki/Hash_table#Collision_resolutio...