19 ms·
I'm sure there exist jobs where its OK not to know that a mod operator exists, but none of mine were of those kind. I'm pretty sure my experience matches the ma
by BeetleB 6y ago
I'm sure there exist jobs where its OK not to know that a mod operator exists, but none of mine were of those kind. I'm pretty sure my experience matches the majority by a pretty large margin.
> A fizzbuzz with fewer false-positive rejections might be something like "implement multiplication without using the multiplication operator".
While possibly a fair question, this is a whole order of magnitude more difficult than FizzBuzz. It requires more domain knowledge as well (lots of people have forgotten how to multiply).
> Allows the quality candidates lots of room to shine.
But this is precisely the opposite of FizzBuzz. The goal is to weed out horrible candidates, not identify great ones.
- cellularmitosis 6y ago> this is a whole order of magnitude more difficult than FizzBuzz Sorry, in my mind the input was restricted to positive integers. My fault for not making that clear. def mul(a, b): accum = 0 while b > 0: accum = accum + a b -= 1 return accum You are correct that accounting for floating point would make this more complicated than fizzbuzz. > But this is precisely the opposite of FizzBuzz. The goal is to weed out horrible candidates, not identify great ones. This accomplishes both at once. That's a super set, not an opposite.
- joks 6y agoIt's even easier to do it with the inclusion of non-integers, though - `prod = a / (1 / b)` Granted, that may be counter to the spirit of the question, but it's a valid answer lol