when key is addedthe hash function maps the key to index but we just added key to this entry your first instinct may be to remove key from this locationsince did not map directly to this entryand store here instead once key is stored in the hash tablehoweverit' only removed when delete operation is performed this collision has to be resolved just like any otherby probing to find another slot in the case of key the linear probe leads us to slot as illustrated in figure ( ( figure adding key to the hash table(aperforming linear probeand (bthe result after adding the key if the end of the array is reached during the probewe have to wrap around to the first entry and continue until either an available slot is found or all entries have been examined for exampleif we add key to the hash tablethe hash function maps the key to slot which contains key the linear probeas illustrated in figure requires wrapping around to the beginning of the array searching searching hash table for specific key is very similar to the add operation the target key is mapped to an initial slot in the table and then it is determined if that entry contains the key if the key is not at that locationthe same probe used to add the keys to the table must be used to locate the target in this casethe ( ( figure adding key to the hash table(aperforming linear probeand (bthe result after adding the key