|
|
|
|
|
by reificator
2609 days ago
|
|
In internet discussions, people say "write fizzbuzz" because it's a well known trivial problem. In an interview, they ask you to print the numbers 0..n to the screen, while replacing numbers divisible by 3 with the string literal fizz, and numbers divisible by 5 with the string literal buzz. The biggest trick or gotcha is that they will also specify that numbers divisible by 15 should be replaced with 'fizzbuzz', but they'll probably say 3 and 5 instead of 15. If your list of accomplishments is really as impressive as you say, you can write a loop, a conditional, and use the modulus operator. And honestly if someone couldn't figure out modulus, they might still be able to pass. (But I'd be VERY curious about their background) Fizzbuzz is not a trick question. It's not a difficult question. It's not meant to make you look stupid if you know how to program. It is only meant to check whether you understand conditional logic and looping. It's intentionally chosen to be the lowest of low bars, because there are so many people who literally can't program but apply anyway. All it's meant to do is weed out the people who have never programmed in their life. |
|
The OP said that one should know how to write a fizzbuzz. I said I couldn't cause I don't know what it is. That doesn't mean I couldn't once it was explained to me.