Re:Thank goodness we hired someone who can reverse a b tree ...
by james_s_tayler on Thursday April 18, 2019 @07:21AM
(#19690171)
Well... vanilla FizzBuzz is easy peasy. Ask them to draw an architecture diagram for FizzBuzz Enterprise Edition on a whiteboard. Or ask them to implement it without using the modulus operator... muahaha. I'm sure that'd stump almost everyone.
You can make FizzBuzz incredibly complicated if you deviate from the vanilla FizzBuzz.
Re:Thank goodness we hired someone who can reverse a b tree ...
by rum3 on Thursday April 18, 2019 @10:37AM
(#19691295)
Asking for it without using the modulus operator is a bit evil haha.
I like this exercise and I sent it to a friend who has a few years of programming experience but is still learning heavily.
The first solution lacked the number being printed but everything else was right. Second solution had the number, but he missed the FizzBall when the number was divisible by both three and five. The third solution lacked the Fizz when it was divisible by three. Finally his fourth solution was correct.
Re:Thank goodness we hired someone who can reverse a b tree ...
by billpg on Thursday April 18, 2019 @09:41AM
(#19690909)
My favorite is the variation where the base numbers and replacement strings are supplied as run-time parameters.
RunFizzBuzz("");
RunFizzBuzz("3=Fizz,5=Buzz");
RunFizzBuzz("7=Rutabaga");
Re:Thank goodness we hired someone who can reverse a b tree ...
by k_sze on Thursday April 18, 2019 @05:42AM
(#19689836)
You'd be amazed at the percentage of people who fail this test. I can't say I have interviewed many people, but even seeing one or two people fail this test for a technical role is mind-boggling.
Re:Thank goodness we hired someone who can reverse a b tree ...
by james_s_tayler on Thursday April 18, 2019 @07:24AM
(#19690181)
I could imagine someone not from a CS background to fail it by perhaps not recognizing they need to the modulus operator or even being aware of its existence?
Outside that, yeah. It indeed boggles the mind that the vanilla version of it could be failed by anyone who has taken elementary programming course.
http://wiki.c2.com/?FizzBuzzTest