Hash Tables By JJ Shepherd
Hash Table Concepts Hash table (Hash map) is a way to associate data with keys Allows for quick access (indexing) data
Hash Table Concepts The structure is generally an array of linked lists The lists are called buckets
Hash Table Concepts Every entry has Key Data The key is ran through a “hash function” that then determines which associated bucket to use
Hash Table Concepts Hash functions can be defined in any number of ways The best ones limit the size of elements in each bucket
Hash Table One way to think of a has table is it behaves like a dictionary Each entry has a word and a definition (key and value) Words are grouped together in sections (buckets) by their first letter and is further sorted alphabetically