We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 79178e7 commit a2577e5Copy full SHA for a2577e5
342-power-of-four/power-of-four.java
@@ -0,0 +1,5 @@
1
+class Solution {
2
+ public boolean isPowerOfFour(int n) {
3
+ return n>0 && (n & (n-1)) == 0 && (n-1)%3==0;
4
+ }
5
+}
0 commit comments