3 ms·
Logic questions are about as far from aha! as you can get. Next you'll be telling me that FizzBuzz is an aha! question. Sure, for some people it is, because the
by cousin_it 12y ago
Logic questions are about as far from aha! as you can get. Next you'll be telling me that FizzBuzz is an aha! question. Sure, for some people it is, because they don't have a clue. Others are able to solve it systematically, and these are the candidates you're looking for.
The same holds for the logic puzzle in the OP. You can solve it step by step, without any leaps. The main difficulty is getting over the initial intellectual "flinch", and making yourself actually engage with the problem. IMO that's an important skill for developers to have.
- czinck 12y agoI agree, although I probably wouldn't ask this in an interview just because of the risk of them seeing it before. At least when I was solving it it felt very much like debugging; you have a few snapshots of the variables and you have to reconstruct the whole logic flow.