```
public class Solution {
public boolean isPowerOfTwo(int n) {
if(n==0) return false;
double x = Math.log10(n)/Math.log10(2);
if(Math.floor(x)==x) return true;
else return false;
}
}
```

Is the above solution good/efficient? Please comment .