Computer Science

Hash Table, explained

A hash table stores key-value pairs using a hash function to map keys to storage locations.
Back to Glossary

Part of the Semantic Notion technical glossary.

Short Definition

A hash table stores key-value pairs using a hash function to map keys to storage locations.

Intuition

Instead of searching every item, a hash table jumps close to where a key should be stored.

Technical Definition

Hash tables use hash functions, buckets, and collision handling to support average-case constant-time lookup, insertion, and deletion.

Example

A dictionary object in many languages is implemented using a hash-table-like structure.

Common Misunderstandings

Hash tables can degrade with poor hashing or adversarial keys.
They do not preserve sorted order by default.

Start here

Need the broader concept map?

Return to the glossary index to move from this definition into adjacent AI, ML, mathematics, and computer science terms.