One particular problem that gets posed a fair amount in interviews for software development positions is how to reverse a string.
On the surface, this seems like a very straight-forward and fairly simple question. However, it's not: the solution depends on the encoding of the string, how you want to deal with grapheme clusters, and what input is valid and isn't valid. Ultimately it depends very much on what you want to do with the reversed string.
This is a very well-known example, and there are many such situations where seemingly straight-forward questions turn out not be straight-forward at all on further reflection.
I'm afraid that when I ask too deeply for such a test in an interview, I might be written off as somebody who makes simple things needlessly complicated, or come across as pedantic of the "well, actually..." kind.
If the complexity was overlooked by the interviewer, I will also take way too long to answer. OTOH, if I don't go in to those things, I'll be giving a solution that I know to be wrong, and may be perceived to lack depth and lack the ability to identify real complexities.
What is a good way to deal with such questions?
Note: the solution to the task isn't the problem here, it's the interview technique.