LeetCode 231. Power of Two(2的N次幂)
原题网址:https://leetcode.com/problems/power-of-two/Given an integer, write a function to determine if it is a power of two.思路:数字n是2的整数次幂,当且仅当n的二进制表示有且只有一个1。public class Solution { public boo
原创
2016-04-05 11:37:05 ·
648 阅读 ·
0 评论