Hacker News new | past | comments | ask | show | jobs | submit login
Optimizing is-multiple checks with modular arithmetic (duriansoftware.com)
89 points by mmastrac on Sept 1, 2018 | hide | past | favorite | 3 comments




"Hackers Delight" is a book that goes over lots of coding tricks like this.


I used this trick in my Fizz-Buzz in my interview to get into Recurse Center. I might have been showing off a bit, but it didn't sink my application.




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

Search: