Quadratic probing: (f (k) + a * j + b * j ^ 2)% M How to choose a and b?
1 answer
There are several meanings for choosing a and b on wikipedia :
For a simple M> 2, most variants a and b will make f (k, j) different for j in [0, (M - 1) / 2]. This choice includes a = b = 1/2, a = b = 1 and a = 0, b = 1. Since there are only about M / 2 different probes per element, it is difficult to guarantee that inserts will be successful when the load factor is> 1/2.
The proof of the guarantee of finding empty slots is here or.
+2
source to share