3 ms·
I realise that the way you've worded the exchange is just to make an example of your point, that said - I would've known the answer to the question, but the way
by headmelted 9y ago
I realise that the way you've worded the exchange is just to make an example of your point, that said - I would've known the answer to the question, but the way it's worded might have made me look at you sideways in an interview if only because of how it's been framed.
If you had worded the query "Regardless of programming language, what's the [accepted/efficient] way to store a series of variables so that I can quickly find a single value later" I'd have given an answer.
Also, as hashtables / dictionaries are key-value stores I'd have been thrown off by the fact that in the question you're not looking for a value by a seperate key, but by the value itself. Fair point on the applicant not knowing how long that would take to return though, and not being familiar with the most common parts of the standard library after 16 years.