Reverse Bits Time : Space : 12345678unsigned int Solution::reverse(unsigned int A) { unsigned int res = 0; for(int i = 0; i < 32; i++) { if(A & (1<<i)) res |= 1<<(32-i-1); } return res;}