Jump to content

2-choice hashing

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by JaGa (talk | contribs) at 00:53, 17 December 2008 (adding orphan template; no mainspace non-redirect non-disambig links using AWB). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

2-choice hashing, also known as 2-choice chaining, is 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.