Needed: A function
h
that maps a key in a large set
U
of possible keys to a small set of possible array indexes of size
m
.
h : U → {0, 1, ... m-1}
h : {1, 2, ... 999999999} → {0, 1, ... m-1}
where
m
is small enough to be the size of a storeable array.
h
is called a
hash function
Hash Functions
Hash Function Example
Terminology