Skip to content

Instantly share code, notes, and snippets.

@chriskooken
Created May 12, 2010 20:06
Show Gist options
  • Save chriskooken/399066 to your computer and use it in GitHub Desktop.
Save chriskooken/399066 to your computer and use it in GitHub Desktop.
bool mystery(unsigned int num){
unsigned int other = num - 1;
bool result = ((num & other) == 0);
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment