Hashtable

From Suhrid.net Wiki
Revision as of 01:34, 22 October 2012 by Suhridk (talk | contribs) (Created page with "* Hashing is designed to solve the problem of needing to efficiently find or store an item in a collection. It is a technique to narrow down the search space. * Hashing means usi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
  • Hashing is designed to solve the problem of needing to efficiently find or store an item in a collection. It is a technique to narrow down the search space.
  • Hashing means using some function or algorithm to map object data to some representative integer value.
  • One basic approach. Calculate a hash for each key and store the hash value in an array index of the same value. Store the key, value pair in the same index positions in other arrays.
  • However, this approach suffers from wasted space in the array - for those array indexes for which corresponding hash values are never generated.