View on GitHub

reads

https://yazansneneh.github.io/reads/

Implementation: Hash Tables

Structure

Hashing

hashing is used to convert the string to integer, and characteristics of that key must be deterministic which means output is determined by input and the code should always return the same integer value.

Creating a Hash

Example :

Key = "Cat"
Value = "Josie"

67 + 97 + 116 = 280

280 * 599 = 69648

69648 % 1024 = 16

Key gets placed in index of 16.
Collisions
store and retrieve

Internal Methods