Next: Clustering
Up: Quadratic probing
Previous: Quadratic probing
  Index
For linear probing we are guaranteed to find an empty place, provided
the table is not completely full. If we use quadratic
probing carelessly, this may not be true. A sequence of successive
probes may only explore a fraction of the table, and this fraction may
be quite small. In that case, we may fail to find an empty location
to store a new item, even though the table is by no means full. It
can be shown, however, that successful insertion is guaranteed
provided
- table.length is a prime number
- loadFactor is less than 0.5
see Section 20.4 of Weiss, Data Structures & Problem Solving
Using Java. Neither of these requirements is difficult to satisfy.
Peter Williams
2005-06-07