Skip to content

Commit a2577e5

Browse files
committed
Time: 1 ms (76.31%) | Memory: 39 MB (96.30%) - LeetSync
1 parent 79178e7 commit a2577e5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

342-power-of-four/power-of-four.java

+5
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)