摘要: 用 O(1) 时间检测整数n是否是2的幂次。样例n=4,返回true;n=5,返回false.注意O(1) 时间复杂度 1 class Solution { 2 /* 3 * @param n: An integer 4 * @return: True or false ... 阅读全文
posted @ 2015-11-12 23:45 码代码的banana 阅读(212) 评论(0) 推荐(0) 编辑