Mental Model
Count how many times each item appears by storing counts in a map. This helps compare or find duplicates quickly.
Analogy: Imagine counting how many apples, oranges, and bananas you have by writing numbers next to each fruit name on a paper.
items: [a, b, a, c, b]
map: { }
↑ start with empty map