Map is an Abstract Data Type used in programming languages.
flowchart LR Key["key: user:42"] --> Hash["hash function"] Hash --> Bucket["bucket index"] Bucket --> Value["value: User"]
Anki
id: hash-table-definition deck: Computer Science::Data Structures tags: data-structures hash-table map
Q: Why is a hash table useful for looking up a value by key? A: It uses the key to compute where the value should be stored, so lookup is usually very fast.
id: hash-table-average-lookup deck: Computer Science::Data Structures tags: data-structures hash-table complexity
Q: What is a hash collision? A: A hash collision happens when two different keys are mapped to the same storage location.