5 ms·
Optimizing is-multiple checks with modular arithmetic
- raphlinus 8y agoI 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.
- pyler 8y agoLLVM https://reviews.llvm.org/D50222 https://reviews.llvm.org/D50222
- pkaye 8y ago"Hackers Delight" is a book that goes over lots of coding tricks like this.