Mental Model
A HashMap stores key-value pairs by turning keys into indexes using a hash function, so we can find values quickly without searching all items.
Analogy: Imagine a library where each book's title is turned into a shelf number by a special code. Instead of searching every shelf, you go directly to that shelf to find the book.
Buckets array: [0] -> null
[1] -> null
[2] -> null
...
Each bucket can hold a linked list of entries:
Bucket[i]: key1:value1 -> key2:value2 -> null