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.
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
- Heap sort
- Heapify
- Heuristic
- Huffman coding
- In-place algorithm
- Insertion sort
- Interval scheduling
- Kadane's algorithm
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.