问题描述 笔记 二进制表示中最低位: 1. n & (n - 1) 2. n & (-n) AC代码 class Solution { public: bool isPowerOfTwo(int n) { return n>0 && ((n&(n-1)) == 0); } };