Using the power of C++


#1

#include<bits/stdc++.h>
unsigned int Solution::reverse(unsigned int A)
{
bitset<32> b(A);
string s=b.to_string();
std::reverse(s.begin(),s.end());
bitset<32> b1(s);
return b1.to_ulong();
}