SLIDE 1
Hash tables
Most data structures that we’re going to see are about storing and manipulating data When only operations Insert, Search and Delete as dictionary op- erations are needed, hash tables can be quite good Many variations of hash tables (or rather the functions implementing them), from not-so-fast but simple to extremely fast but complicated Elements are pairs (key,data); keys distinct Intuition: you have some, say, “clever array”, and
- Insert(elem) inserts elem somewhere into the array
- Search(elem) knows where elem is stored and returns correspond-
ing data
- Delete(elem) also knows where elem is and removes it
1