This is probably a stupid question, but I canβt love God, to understand what I am missing here in theory behind hash tables with a chain.
Here is what I understand:
The hash table uses a hash to associate the key with the place where the value is stored. Sometimes a hash prints the same location for different keys, i.e. Collisions may occur.
In this case, we can implement the chain by storing all values ββwith the same location in a linked list in this place.
I do not understand what it is:
When you enter a key, and the hash function creates the location where the chain takes place, how does it determine what value in the linked list at this place belongs to this particular key, unlike the other key involved in the collision?
I understand that this is a basic theory, but if someone can point out errors in my reasoning or tell me what I am missing, I would really appreciate it.
source share