Hash Table: Difference between revisions
Jump to navigation
Jump to search
Line 14: | Line 14: | ||
=Canonical Use= | =Canonical Use= | ||
Hash tables are used in situations where we need to do fast lookups of arbitrary keys. | |||
* [[The 2-SUM Problem]] | * [[The 2-SUM Problem]] | ||
=Hash Table Implementation Discussion= | =Hash Table Implementation Discussion= | ||
==Chaining== | ==Chaining== |
Revision as of 19:57, 16 October 2021
External
Internal
Overview
Hash tables are one of the most used data structures in programming. They don't have that many operations (INSERT(), DELETE() and SEARCH()), but what they do, they do really well. Conceptually, a hash table is an array that provides immediate random access for constant time insertion, deletion and lookup based on an arbitrary key and not an integral index, for a dynamic set of keys. The storage is actually done in proper arrays, and the mapping between the arbitrary key and the integral position in the array is provided by a hash function.
Canonical Use
Hash tables are used in situations where we need to do fast lookups of arbitrary keys.