Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Any solution with a bounded loop is O(1) too, as would be the case for a loop on the bits of a 32- or 64-bit uint.

What makes this interesting is that it's loopless and compiles to only a few instructions.



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

Search: