Mental Model
Count how many times each item appears using a map to remember counts.
Analogy: Like counting how many apples, oranges, and bananas you have by putting each fruit in a basket and adding one each time you see it.
Items: [apple, apple, orange, banana, apple]
Map: {apple: 0, orange: 0, banana: 0} ↑