Hash Tables
Trade a bit of memory for answers in constant time.
Start the module
1. Hash Table Basics · 4 min
0 of 8 lessons · 0% complete
Hash Tables visualizer
Every lesson in this module opens with an animation you can step through. This is the first one — Hash Table Basics: Turn a key into an address and skip the search.
Hash Table Basics
Step 1 of 6
hash—resultempty table
keys
SKU-118
SKU-903
get 118
get 000
table — bucket = last two digits % 6
0
1
2
3
4
5
118·42
903·7
A hash table is numbered bins. The key itself decides which bin — no shelf-walking, no sorting.
- Lessons
- 8
- Minutes
- 40
- Problems
- 14
- Concepts
- 6
Quiz yourself: 3 questions from this module
1 / 3