|
|
|
|
|
by chrisbennet
4309 days ago
|
|
It isn't supposed to be a test of whether you know the modulo operator but in practice it works out that way. True story; my wife was going over her (correct) answers to a coding test with the interviewer and he asked her "What's this?" in reference to the modulus operator. The interviewer didn't recognize it. I use the modulus operator almost daily so it seems obvious to me but I realize that everyone has different experiences or things they are ignorant about. IMO, fizzbuzz is a test of whether you know the modulus operator "trick". |
|
Yep. And at HN, actually knowing this or anything else assures that you will be downvoted with a probability of 1.
> I use the modulus operator almost daily so it seems obvious to me but I realize that everyone has different experiences or things they are ignorant about.
I see the modulo operator applied to a common undergraduate math question -- if a given date lands on a Tuesday, and if you add 500 days, what day of the week does the result land on?