Jump to content

2-choice hashing

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Bluebot (talk | contribs) at 18:50, 29 March 2006 (Bringing "External links" and "See also" sections in line with the Manual of Style using AWB). 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.