"Gotcha" questions are not effective at determining problem solving ability. Questions that have more than one means of approach are much more effective. If a question is superficially easy if you know the trick, but impossibly hard without it, then it doesn't offer any benefit to assessing how a person might resolve specification ambiguity, approach the problem's possible pitfalls, and ultimately resolve the issue. Examples of these types of questions include the "detect a loop in a linked list" (tortoise and hare algorithm), "swap two variables without using a third" (XOR or use pointer math), "three light bulbs in a room, three switches outside, you can only enter once" (two on, wait, one off, feel the off bulbs for the warm one).