You scan [1, 2, 1, 3, 1]. What frequency should a map store for key 1?
Answer & explanation
Answer: 3
The requested value occurs at positions 0, 2, and 4.
Practice hashing with self-contained questions. Check your answer, then use the explanation to understand the reasoning.
Answer: 3
The requested value occurs at positions 0, 2, and 4.