Re:People suck at technical interviews (2014)
by imtringued on Friday June 10, 2016 @08:31AM
(#11875882)
The trick part of FizzBuzz is that the easiest solution relies on the magic "15".
[ Parent
| on HN ]
Re:People suck at technical interviews (2014)
by efaref on Friday June 10, 2016 @09:02AM
(#11876039)
Even 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.