Example 1:
Input: 00000010100101000001111010011100
Output: 00111001011110000010100101000000
Explanation: The input binary string 00000010100101000001111010011100 represents the unsigned integer 43261596, so return 964176192 which its binary representation is 00111001011110000010100101000000
Reverse Bits when an integer is given and return an integer
unsignedintrevBits(unsignedint n){int rev =0;while (n >0) { // bitwise left shift // 'rev' by 1 rev <<=1; // if current bit is '1'if (n &1==1) { rev = rev ^1; } // bitwise right shift // 'n' by 1 n >>=1; }return rev;}