codeintuition-logo

Introduction to quadratic probing


Now that we know how a hash table is implemented using linear probing and some of its limitations, we look at another popular open-addressing collision resolution scheme called quadratic probing. It is a slight variation over linear probing with all its advantages but reduces the primary clustering problem by modifying the probe sequence.

Like linear probing, the internal array stores the key-value pair in a quadratic probing scheme. The size of the internal array limits the size of the hash table, and because the array has contiguous memory, it has performance benefits due to the locality of reference.

Loading Image

Logical representation of the internal array storing the key value mappings and empty slots

Liking the course? Check our discounted plans to continue learning.