3 ms·
I'm curious what the full starting instructions were, and I concede that this might be a regional or cultural thing, but this entire article is missing that in
by kej 2y ago
I'm curious what the full starting instructions were, and I concede that this might be a regional or cultural thing, but this entire article is missing that in the traditional children's game and in most online FizzBuzz problems you have to output the original number for numbers that aren't multiples of 3 or 5. That is, the input [1, 2, 3, 4, 5] should yield the output [1, 2, "fizz", 4, "buzz"].
I'd be nervous about an applicant that came up with a very clever solution for the hard part of a problem but completely overlooked the simple part. (Again, not sure whether this is what happened here, but the change from how the problem is usually presented makes me wonder.)