Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hash Tables By JJ Shepherd.

Similar presentations


Presentation on theme: "Hash Tables By JJ Shepherd."— Presentation transcript:

1 Hash Tables By JJ Shepherd

2 Hash Table Concepts Hash table (Hash map) is a way to associate data with keys Allows for quick access (indexing) data

3 Hash Table Concepts The structure is generally an array of linked lists The lists are called buckets

4 Hash Table Concepts Every entry has
Key Data The key is ran through a “hash function” that then determines which associated bucket to use

5 Hash Table Concepts Hash functions can be defined in any number of ways The best ones limit the size of elements in each bucket

6 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


Download ppt "Hash Tables By JJ Shepherd."

Similar presentations


Ads by Google