hash tables figure storing the first five keys in the hash table linear probing the first five keys were easily added to the table the resulting index values were unique and the corresponding table entries contained null referenceswhich indicated empty slots but that' not always the case consider what happens when we attempt to add key to the hash table the hash function maps this key to entry but that entry already contains key as illustrated in figure the result is collisionwhich occurs when two or more keys map to the same hash location we mentioned earlier that the goal of hashing is to provide direct access to collection of search keys when the key value can be one of wide range of valuesit' impossible to provide unique entry for all possible key values figure collision occurs when adding key if two keys map to the same table entrywe must resolve the collision by probing the table to find another available slot the simplest approach is to use linear probewhich examines the table entries in sequential order starting with the first entry immediately following the original hash location for key value the linear probe finds slot availableso the key can be stored at that positionas illustrated in figure ( ( figure resolving collision for key requires adding the key to the next slot