
Desicription
Given an integer (signed 32 bits), write a function to check whether it is a power of 4.
Example 1:
1 |
Input: 16 |
Example 2:
1 |
Input: 5 |
Follow up: Could you solve it without loops/recursion?
Solution
1 |
class { |

Given an integer (signed 32 bits), write a function to check whether it is a power of 4.
Example 1:
1 |
Input: 16 |
Example 2:
1 |
Input: 5 |
Follow up: Could you solve it without loops/recursion?
1 |
class { |
近期评论