【LeetCode 231_整数_位运算】Power of Two 1 bool isPowerOfTwo(int n) 2 { 3 return n > 0 && !(n & (n - 1)); 4 }