Mental Model
Count how many times each item appears by using a map that links items to their counts.
Analogy: Imagine counting how many apples, oranges, and bananas you have by writing down each fruit and the number next to it on a piece of paper.
Array: [a, b, a, c, b, a] HashMap: a -> 3 b -> 2 c -> 1
