3 ms·
The trick part of FizzBuzz is that the easiest solution relies on the magic "15".
by imtringued 10y ago
The trick part of FizzBuzz is that the easiest solution relies on the magic "15".
- efaref 10y agoEven that's an unnecessary complication. The code solution should read like the spec, so that if someone comes along later to make FizzBuzz depend on some other set of constraints, they know what to do. The compiler can optimize away the duplicate tests. That's its job.