C++ || 100% fast || 0ms
\nclass Solution {\npublic:\n    bool reorderedPowerOf2(int n) \n{\n   string str = to_string(n);\n   sort(str.begin(),str.end());\n   long long int num;\n   in
```\nclass Solution {\npublic:\n    bool reorderedPowerOf2(int n) \n{\n   string str = to_string(n);\n   sort(str.begin(),str.end());\n   long long int num;\n   int counter=0;\n   \n   while(true)\n   {\n      num = pow(2,counter++);\n      \n      string temp = to_string(num);\n      \n       \n      if(temp.length()>str.length())\n      {\n          //cout<<"temp="<<temp<<endl;\n          break;\n      }\n       \n      sort(temp.begin(),temp.end());\n         \n      if(str == temp)\n      return true;\n     \n   }     \n   return false;   \n}\n};\n```
['C', 'C++']