Statement▼
Given an unsigned 32-bit integer n, we need to calculate a 32-bit unsigned integer with reversed bits. When we say “reverse” we don’t mean flipping the 0s to 1s and vice versa, but simply reversing the order in which they appear, i.e., from left-to-right to right-to-left.
Constraints:
- 0≤
n