next up previous
Next: Double Hashing Up: CSE 2320: Algorithms and Previous: Problem with Linear Probing:

Quadratic Probing

h(k,i) = (h(k) + c1i + c2 i2) mod m

Example
h(k1,i) = (h(k) + i + i2) mod m, c1 = c2 = 1

In this example, the probe sequence is

h(k)
h(k) + 2
h(k) + 6
h(k) + 12
...



Copyright © 1998 The University of Texas at Arlington