|= v >> 2; v |= v >> 4; v |= v >> 8; v |= v >> 16; v |= v >> 32; v++; return v; } Limitations Alternating signs If the sign of the offset is alternated (e.g. +1, −4, +9, −16, etc.), and if the number of buckets is a prime number congruent to 3 modulo 4 (e.g. 3, 7, 11, 19, 23, 31, etc.), then the first offsets will be unique (modulo ). In other words, a permutation of 0 through is obtained, and, consequently, a free bucket will always be found as long as at least one exists. References External links Tutorial/quadratic probing Hashing Articles with example C code Articles with example Java code Search algorithms