Last active
March 7, 2019 00:55
-
-
Save yphastos/6747e99b2c96c1d4e219af47f28ec231 to your computer and use it in GitHub Desktop.
secondRightmostZeroBit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int secondRightmostZeroBit(int n) | |
{ | |
return ~(n|=n+1) & -~n ; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment