PREV INDEX NEXT

Author: Unknown
Subject: Storing the key in the hash table
Date: Tuesday, 14 Apr 2020, 15:25:40

i'm a bit confused generally as to why we need to store the key in the hash table. if we wanted to insert, we would feed the key to the hash funtion (which in our case is POSITION) to get the location where  we have to search. To lookup, we would also feed the key to the hash function to get where in the hash table the value we are looking for is. Why then do we also store the key in the locations (if my understanding of the functions i've explained is right)?
PREV INDEX NEXT