【LeetCode 231_整数_位运算】Power of Two

1 bool isPowerOfTwo(int n)
2 {
3     return n > 0 && !(n & (n - 1));
4 }
posted @ 2015-07-06 11:07  QingLiXueShi  阅读(170)  评论(0编辑  收藏  举报