I wouldn't hire an electrical engineer who complained that he shouldn't have to know Ohm's Law, either.
I wouldn't hire an electrical engineer who complained that he shouldn't have to know Ohm's Law, either.
...And how you are keeping track of that and other such minutiae. What data structures are you using and why? And how about if X which would invalidate your approach.
Also, it's not about "knowing" it. It's about implementing it in such a way as to please the interviewers.
It's pop quiz nonsense.
This is a good question, IMO, because it tests “I need to do this, which data structure would work well for it”, which does come up often in real life.
As for pleasing the interviewers, of course it is about pleasing the interviewers. They're making the "buy" decision on the talents you're "selling". Of course the seller needs to please the buyer to close the sale. I don't know how it could work any other way.