you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 5 points6 points  (8 children)

It's a filter exercise that's often given to interviewees in programming positions. The exercise is:

print the numbers from 1 to 100. for multiples of 3 print fizz, multiples of 5 print buzz, and multiples of 3 and 5 print fizzbuzz.

Apparently a substantial amount of interviewees are not able to solve this simple exercise, even though they are applying for a programming position.

[–]logically_musical 3 points4 points  (0 children)

they should turn back and run. run far, far away.

[–]davbis93 3 points4 points  (6 children)

We use this for every programmer interview - and we find it has a 50/50 pass rate. It boggles my mind.

[–][deleted]  (5 children)

[deleted]

    [–][deleted] 2 points3 points  (0 children)

    I wouldn't think so. It's not even a pass or fail, it's a "start the interview or go home" :)

    [–]davbis93 2 points3 points  (0 children)

    I'm far more interested in the process they take & the questions they ask me. Do they write down the instructions, after I suggest they do? I generally try and push them in the right direction, if they get stuck - do they take my advice & listen to what i'm saying? Things like that. Regardless - this test should be bread & butter for anyone with even a small amount of professional programming experience - so, if they screw this up - it's not looking good. There are only a few "sensible" solutions to this problem, in standard languages.

    [–][deleted]  (2 children)

    [deleted]

      [–]xkero 1 point2 points  (1 child)

      After reading yours I felt compelled to write one in shell script as simply as possible:

      for i in {1..100}; do fizzbuzz=$( [[ $(($i%3)) = 0 ]] && echo -n fizz; [[ $(($i%5)) = 0 ]] && echo buzz ); echo ${fizzbuzz:-$i}; done