Problem: Reverse Bits
Reverse the bits of a 32-bit unsigned integer A.
0 <= A <= 232
The first and only argument of input contains an integer A.
Return a single unsigned integer denoting the decimal value of reversed bits.
Input 1: 0 Input 2: 3
Output 1: 0 Output 2: 3221225472
00000000000000000000000000000000 => 00000000000000000000000000000000
00000000000000000000000000000011 => 11000000000000000000000000000000
To solve this problem first find the positions of set bits in the original number then mirror those set bits according to that in your resultant variable.
That is for example if ith bit is a set bit in original number then set the (31-i)th bit of resultant number.