Mental Model
A hash table stores data by turning keys into numbers to find values quickly. It uses a special function to do this conversion.
Analogy: Imagine a library where each book has a unique code made by a librarian. Instead of searching all shelves, you go directly to the shelf number from the code to find the book fast.
Keys: ["cat", "dog", "bird"] Hash Function: key -> number Hash Table: [0] -> "cat" [1] -> null [2] -> "dog" [3] -> "bird" [4] -> null [5] -> null
