Caffeinated Coder
Book an appointment
Lesson 13 · Data structures

Hash maps: finding things by key

A dictionary lets a program find a value by its key, such as a person's age by their name, without searching through everything. Step through ten lines of Python and watch a hash function turn each key into a number that picks a slot, see what happens when two keys want the same slot, how the table grows when it fills up, and why some values cannot be keys.

11 min10 steps5 questionsBeginner
Fig 13 · Interactive
Loading figure…
or ← →

Quiz Unlocks after the last step.