Created
January 5, 2017 12:33
-
-
Save enif-lee/56b1a6a628b18ce5320cd2b916859fed to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public class LogUtil { | |
static int log2 (int number) { | |
int logCount = 0; | |
while(number>>=1 > 0) logCount++; | |
return logCount; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment