Mental Model
A HashMap stores key-value pairs by turning keys into indexes to quickly find values.
Analogy: Imagine a library where each book has a unique code. Instead of searching all shelves, you use the code to go directly to the right shelf and find the book fast.
Buckets array: [null, null, null, null, null] Each bucket can hold a linked list of entries: Bucket 0 -> null Bucket 1 -> null Bucket 2 -> null Bucket 3 -> null Bucket 4 -> null