We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b51f292 commit fe8862cCopy full SHA for fe8862c
leetcode-com-explore-challenge-card-august-leetcoding-challenge-549-week-1-august-1st-august-7th-3412(a).cpp
@@ -0,0 +1,6 @@
1
+class Solution {
2
+public:
3
+ bool isPowerOfFour(int num) {
4
+ return ( ( num>0 ) && ( (num-1) %3==0 ) && ( ( num&(num-1)) ==0 ) );
5
+ }
6
+};
0 commit comments