leetcode 231 Power of Two(难易度:Easy)
来源:互联网 发布:c语言for的用法 编辑:程序博客网 时间:2024/06/05 21:56
Power of Two
Given an integer, write a function to determine if it is a power of two.
代码:
bool isPowerOfTwo(int n) { return (n > 0) && (!(n &(n - 1)));}原题地址:https://leetcode.com/problems/power-of-two/
0 0
- leetcode 231 Power of Two(难易度:Easy)
- leetcode 326 Power of Three(难易度:Easy)
- leetcode 160 Intersection of Two Linked Lists(难易度:Easy)
- [Leetcode 231, Easy] Power of Two
- 【LeetCode】(231)Power of Two(Easy)
- <LeetCode><Easy>231 Power of Two
- LeetCode #231 - Power of Two - Easy
- 【leetcode】Power Of Two[easy]
- leetcode 058 Length of Last Word(难易度:Easy)
- leetcode 191 Number of 1 Bits(难易度:Easy)
- LeetCode 231. Power of Two --Easy
- Leetcode 231. Power of Two (Easy) (cpp)
- LeetCode(231)-- Power of Two
- LeetCode(231) Power of Two
- leetcode:数学:Power of Two(231)
- leetcode 235 Lowest Common Ancestor of a Binary Search Tree(难易度:Easy)
- leetcode 104 Maximum Depth of Binary Tree(难易度:Easy)
- leetcode-231 Power of Two
- 我来,然后,不去
- Cocos2d-x 3.0 触摸机制
- 我爱你,祖国
- 核心CISCO7609故障处理
- 静态路由
- leetcode 231 Power of Two(难易度:Easy)
- 家用轿车轮胎多久更换一次?
- java应用fullgc时如何排查问题
- Xcode:添加自定义代码块
- 记录并通过邮件上传App崩溃日志
- 初识MVVM
- iOS开发UIScrollView使用详解
- Linux(Ubuntu)下如何安装JDK
- 将一个十进制数字转化为x进制/将x进制的字符串转换成10进制