Skip to content

Comment on Solving Fizz Buzz with Cosinesparent

Comments

Sort of fun to muse whether almost all FizzBuzz implementations are a bit wrong.

They're only wrong if they provide output that isn't in the spec. Adding "bazz" isn't in the spec, and assuming that something indeterminate MIGHT come later is also not part.

Yep, that's how people answer.

Folks really really don't like thinking that "FizzBuzz" case maybe shouldn't be there, future extension or factor edit or no.

// And as long as we're just manually computing factor times factor and typing out the results for it like "FizzBuzz" we might as well just hardcode the whole series...

I think the reqirement should be to n digits. Then at least we can benchmark it.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.