题目描述
Reverse bits of a given 32 bits unsigned integer.
Example 1:
1 | Input: 00000010100101000001111010011100 |
Example 2:
1 | Input: 11111111111111111111111111111101 |
考查位运算,比较坑的点是位运算符的优先级相对于四则运算更低。
代码实现
1 | class Solution { |
题目描述
Reverse bits of a given 32 bits unsigned integer.
Example 1:
1 | Input: 00000010100101000001111010011100 |
Example 2:
1 | Input: 11111111111111111111111111111101 |
考查位运算,比较坑的点是位运算符的优先级相对于四则运算更低。
代码实现
1 | class Solution { |