Given an integer, write a function to determine if it is a power of two.
Example 1:
1 |
Input: 1 |
Example 2:
1 |
Input: 16 |
Example 3:
1 |
Input: 218 |
1 |
class { |
Given an integer, write a function to determine if it is a power of two.
Example 1:
1 |
Input: 1 |
Example 2:
1 |
Input: 16 |
Example 3:
1 |
Input: 218 |
1 |
class { |
近期评论