Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Red flags I saw while doing technical interviews. Parent comment
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
> 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.
Granted, that may be counter to the spirit of the question, but it's a valid answer lol
Sorry, in my mind the input was restricted to positive integers. My fault for not making that clear.
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.