|
|
|
|
|
by 72f988bf
1731 days ago
|
|
FizzBuzz is one of those puzzles where majority of experienced programmers won't find the solution easily as it involves the modulo operator in weird ways. The modulo operator is rarely used in practice, unless you're writing your own hash table or some other internal where bucketizing by some ID is relevant. Using the modulo within a for-loop though, virtually never happens. So unless you're niche where using modulo every other day, or you're just out of school where you just learned about "+,-,*,/,%" , you have a good chance at failing fizzbuzz if you don't remember it's "that modulo 3 and modulo 5 silly puzzle" There are better ways of testing for iterating, iterating through a real collection of elements is already much better than FizzBuzz. |
|