About coding the“FizzBuzz” interview question

Michele Riva
5 min readApr 25, 2019

The “Fizz-Buzz test” is an interview question designed to help filter out the 99.5% of programming job candidates who can’t seem to program their way out of a wet paper bag. (wiki.c2.com)

Sometimes, even the simplest problem can become tricky.
That is the case for the FizzBuzz interview question.

Write a program that prints the numbers from 1 to 100.
But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”.
For numbers which are multiples of both three and five print “FizzBuzz”.

1, 2, Fizz, 4, Buzz, Fizz, 7, 8, Fizz, Buzz, 11, Fizz, 13, 14, FizzBuzz...

Pretty simple, isn’t it? Well, this actually can be harder than you think!
Every programming language provides its own way and tools to handle that kind of problem… but how can we measure skills with such a simple task?
Is it essential to ask super-complex questions about parallel programming, algorithms, type theory, graph theory…?

Of course, these are important topics and should definitely be tested, but maybe you want to test just his…

--

--