153. Reverse Bits
EasyBit Manipulation
Reverse the bits of a given 32-bit unsigned integer and return the resulting value. The input is provided as its decimal value; treat it as a 32-bit binary number and reverse the order of all 32 bits.
Examples
Input: 43261596
Output: 964176192
Explanation: 43261596 is 00000010100101000001111010011100; reversed it is 00111001011110000010100101000000 = 964176192.
Constraints
- 0 <= n <= 2^31 - 1 (the input fits in a signed 32-bit integer; the reversed result may use all 32 bits and is returned as an unsigned value)
Loading...
Run checks all cases above. Submit evaluates all test cases.