Hashing
Hashing
is a method for maintaining a collection
via an array of
Item
s
(or
(Item *)
s)
, e.g.
Item *a[N];
with optimal performance:
O(1)
search/insert/delete
Requires a function to map keys to indexes:
hash
:
Key → 0..N-1