The last two times I've been on the job market, I've been asked a fair number of logic puzzles during the interviews. There are contrasting opinions on whether or not they give accurate insight into the quality of a candidate, but they're easily among the most stressful tasks to be presented with. If nothing else, they definitely test how easy it is to rattle a candidate. It's very tempting to want to try to fill the silence as you toil, or not waste the interviewer's time and just give up. Neither mindset is a productive one. What I do, is think out loud, and where applicable, diagram the situation. This helps me in a few ways:
- It helps me understand the problem. Have you ever noticed that explaining a problem to someone often helps you solve it yourself? Vocalizing your thought process slows you down, and often times forces you to notice something that your mind was glossing over when you were just thinking to yourself.
- It gives the interviewer some insight into your thought process, which is really the point. Even if you don't get the answer, you can get 'partial credit' for the insights you do identify.
- It helps fill a little of the dead silence, which slows the impending dread that otherwise begins building immediately.
At what point should you cry uncle? Probably much later than you think. Why?
- It hasn't been as long as it feels. Time seems to speed up in these situations. 5 minutes will probably feel like an hour
- The interviewer probably wants to know how tenacious you are. Is this person going to just give up when I give them a problem on the job?
- The interviewer probably isn't as bored as you think. Do you remember the last time you told one of these? It was kind of fun watching them struggle to puzzle it out, probably going through the same ideas you had.
Ok, enough of my interviewing perspectives. Here's the first puzzle. I'll post more as time permits.
Puzzle 1 - Visual, Logical
Question
You have 3 points, A, B, and C in the shape of a triangle on a piece of paper. To begin, choose any location on the paper, and place a dot there. From there on, you repeat the following pattern.
- At random, choose point A, B, or C
- Place a new point midway between the last dot you placed, and the point you selected.
The question is, after you do this a few thousand times, what will your paper look like?
Answer
I don't want to post the image inline. It's too hard to avert your eyes. here's a link to an image: Answer
This problem lends itself to a programmatic solution. When I was asked this question, the stakes were high (my instructor was giving away gmail invites, which were hard to come by at the time) so I wrote a quick and dirty winform app that shows the answer. You can download a programmatic solution here: Answer (The code, and a .net 2.0 winform executable are included)