Hash Tables

Linear Probing Concept and Algorithm

What is Probing?

Since a hash function gets us a small number for a key which is a big integer or string, there is a possibility that two keys result in the same value. The situation where a newly inserted key maps to an already occupied slot in the hash table is called collision and must be handled using some collision handling technique. Probing is one such technique where a collection of key–value pairs is maintained in order to look up the value associated with a given key.

Types of Probing

There are mainly two types of probing:

  • a. Linear Probing

  • b. Quadratic Probing