AI engineering glossary · Data structures algorithms

What is hash table?

Hash table (also called hash map, dictionary): A structure that stores key-value pairs by running each key through a function that produces an array position, allowing lookup, insertion and deletion in about one step on average. It is the basis of Python dictionaries and sets.

Level: beginnerTopic: Data structures algorithms

Hash table: an example

Storing phone numbers by name: looking up 'Asha' hashes the name to a slot and returns her number without scanning all contacts.

Related terms

More Data structures algorithms terms

Where you learn it

Hash table is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.