hash tables are good for dictionaries
keys starting at 0
direct address table:
$\text{keys} \in {0,…,m-1}$
$T[k] = \begin{cases} \text{nil} & \text{if no item with key k}\\ \text{pointer to element with key k} & \text{otherwise}\end{cases}$
for other purposes, change the mapping function
simple example:
choosing a hash function
problem of collision: different keys hashed to same slot
solving collisions
chaining: put items that hash to same value in a linked list
α is load factor
for n keys, m slots,
$\alpha = \frac{n}{m}$
open addressing