We had a senior level interview candidate fail a nuance of the FizzBuzz question12.
I mean, really, utterly, completely, failed the question - not even close.
I even coached him through to thinking about using a loop and that
5 were really worth considering as special cases.
He blew it.
Just for QA purposes, I gave the same exact question to three teammates; gave them 5 minutes; and then came back to collect their pseudo-code. All of them nailed it and hadn't seen the question before. Two asked what the trick was...
On a different logic exercise, the candidate showed some understanding of some of the features available within the language he chose to use (C#). So it's not as if he had never written a line of code. But his logic still stunk.
My question is whether or not I should have given him the answer to the logic questions.
He knew he blew them, and acknowledged it later in the interview.
On the other hand, he never asked for the answer or what I was expecting to see.
I know coding exercises can be used to set candidates up for failure (again, see second link from above). And I really tried to help him home in on answering the core of the question. But this was a senior level candidate and Fizz-Buzz is, frankly, ridiculously easy even after accounting for interview jitters.
I felt like I should have shown him a way of solving the problem so that he could at least learn from the experience. But again, he didn't ask.
What's the right way to handle that situation?
1Okay, that's not the link to the actual FizzBuzz question, but it is a good P.SE discussion around FizzBuzz and links to the various aspects of it.
2 To help clarify, this is the nuance of Fizz-Buzz I asked and it's from Project Euler's first problem. Substitute printing Fizz | Buzz for summing the numbers and you have the same fundamental question.
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Write a function that finds the sum of all the multiples of 3 or 5 below 1000.
3 This question attracted more attention than I had expected, and I appreciate all of the replies. Some of the later answers have really gotten to the core of my question, so I'll allow the community to review and up-vote before assigning "the" answer.
4 I selected "the" answer based upon community votes at that point in time. And I think Yannis' answer is appropriate for interviews with newer devs. I think the collective response focusing on the lack of asking for the answer is spot-on as well.