3 ms·
When's the last time you had to modulo a number? I feel like when I was first asked this question I got hung up on that more that anything.
by jryan49 10y ago
When's the last time you had to modulo a number? I feel like when I was first asked this question I got hung up on that more that anything.
- morgante 10y agoYou don't need the modulus operator to solve FizzBuzz.
- jryan49 10y agoYeah, that's true. But any standard implementation is going to use %...
- morgante 10y agoSure, but the important bit is that if you completely blank and forget about % (I have done so) you can still solve it easily if you're a half-decent programmer. Not to mention that if I see a candidate is stumped on the modulus part I'll offer them % myself.
- jryan49 10y agoYeah when I blanked I just panicked and could continue. I'm more comfortable in interviews now where that wouldn't happen.