Ah, you've got a gotcha bullet point question that you think is a killer technical ability question. But you're asking it in a completely abnormal situation, an interview. All you're testing for is the candidate's ability to answer your clever question in a scenario where their ability and personal value is actively being judged; which is wholly unlike any day-to-day challenge they are to encounter.
The question is not a gotcha. It is not trivia. It is not even a "killer technical ability" question. It's a question I considered not including because I thought it was too easy. Folks I've interviewed proved me wrong and I've come to realize that when I get any signal from it, it's the best question I ask.
If you know what a hash map or dictionary is then you can solve it. If you can't answer a problem because you're under pressure then that's a no hire signal on its own.