I think part of the key with giving FizzBuzz is telling the candidate that any working solution is AOK and meaning it, in other words the dumbest brute force loop is a successful answer. My suspicion is that more candidates than one would expect get hung up worrying about giving some sort of clever answer to impress the interviewer that they bobble it up a bit.
That said, for FizzBuzz proper, one should have dozens of solutions memorized for these situations, but for similarly easy questions the candidate might not have come across that might end up being a big deal.
> My suspicion is that more candidates than one would expect get hung up worrying about giving some sort of clever answer to impress the interviewer that they bobble it up a bit.
I've definitely felt that pressure as an interviewee. It's pretty disheartening to write a simple and obviously correct implementation only to have the interviewer express their disappointment that you didn't use a particular optimization.
The most fun technical questions I've had start with making a functional algorithm and then massaging it to meet whatever time/space complexity requirements are asked for. Sometimes it results in a complete rewrite and that's ok, the real world works like that too.
> It's pretty disheartening to write a simple and obviously correct implementation only to have the interviewer express their disappointment that you didn't use a particular optimization.
I almost always preface whiteboard coding sessions with "I'm going to write some dumb, slow code and then we can make it faster if you want. Sound OK?" I've never had anyone disagree with this, but if they tell you they want you to go straight to the clever solution, hey, now you know what they're looking for.
Plus, you can "scale up" the interview to harder questions so you can test the candidate without making them feel bad by bombing a touch problem at the very start of the interview.
That said, for FizzBuzz proper, one should have dozens of solutions memorized for these situations, but for similarly easy questions the candidate might not have come across that might end up being a big deal.