Hacker News new | past | comments | ask | show | jobs | submit login

we all know what the %15 is for.

but note that if you do 3 comparisons, or 2 comparisons and an "extra" comparison, you've done the same number of comparisons, it's not really 'extra'

then go ahead and keep adding factors and see which results in more comparisons as we rack up the actually extra comparisons for various combinations of factors

btw and ftw, your modulo and string test example, more correct than the usual implementation, is among the most efficient:

http://www.zoharbabin.com/which-fizzbuzz-solution-is-the-mos...

// still not so serious...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: