🎉 October Learning Month — learn a new software term every day!
An interactive flashcard trainer for software engineering terms.

Hash Table

In plain terms

A structure that maps keys to values for near-instant lookup.

Going deeper

It runs each key through a hash function to compute a slot index, so finding a value takes roughly constant time regardless of how much data is stored. Collisions (two keys, same slot) are handled with chaining or probing. It underpins dictionaries, caches, and database indexes.

Under the hood

Average O(1) operations degrade to O(n) with poor hashing or many collisions; load factor triggers resizing, and ordering isn't guaranteed unless it's a linked variant.

Examples

Python dict, Java HashMap, JavaScript object/Map, database in-memory indexes.

Think of it like...

Like a coat check: you hand over a coat and get a numbered tag, and retrieval is instant because the number points straight to the right hook, no searching the whole rack.

Feedback & Bug Report