Coding · Medium · Pro
Reverse bits of a 32-bit integer
CodingBit ManipulationSenior
Approach
- Shift result left, take LSB of n, shift n right.
- Repeat 32 times.
Java Solution
Java
int reverseBits(int n) {
int an…Coding · Medium · Pro
int reverseBits(int n) {
int an…