next up previous
Next: Double Hashing Up: l5 Previous: Problem with Linear Probing:

Quadratic Probing

h(k,i) = (h(k) + $c_1$i + \(c_2 i^2\)) mod m

Example
h($k_1$,i) = (h(k) + i + $i^2$) mod m, $c_1$ = $c_2$ = 1

In this example, the probe sequence is

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

What if m = 20?


next up previous
Next: Double Hashing Up: l5 Previous: Problem with Linear Probing: