Jump to content

2-choice hashing

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Zawersh (talk | contribs) at 00:40, 6 October 2007 (more specific cat). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A variant of a hash table in which keys are added by hashing with two hash functions. The key is put in the array position with the fewer (colliding) keys. Some collision resolution scheme is needed, unless keys are kept in buckets. The average-case cost of a successful search is O(2 + (m-1)/n), where m is the number of keys and n is the size of the array. The most collisions is with high probability.

See also

Public Domain This article incorporates public domain material from Paul E. Black. "2-choice hashing". Dictionary of Algorithms and Data Structures. NIST.