View on GitHub

reading-notes

Hash Tables

Intro to Hash Tables

Terminology:

Creating a Hash

Hash maps do this to store values:

Hash maps do this to read value:

+accept a key +calculate the hash of the key +use modulus to convert the hash into an array index +use the array index to access the short LinkedList representing a bucket

Internal Methods

send the key to the GetHash method. Once you determine the index of where it should be placed, go to that index Check if something exists at that index already, if it doesn’t, add it with the key/value pair. If something does exist, add the new key/value pair to the data structure within that bucket.

resources:

https://codefellows.github.io/common_curriculum/data_structures_and_algorithms/Code_401/class-30/resources/Hashtables.html

https://www.youtube.com/watch?v=MfhjkfocRR0

https://www.hackerearth.com/practice/data-structures/hash-tables/basics-of-hash-tables/tutorial/

https://en.wikipedia.org/wiki/Hash_table