c++ | easy | short
\n\n# Code\n\nclass Solution {\npublic:\n   bool reorderedPowerOf2(int n) {\n        string s = to_string(n);\n        sort(s.begin(),s.end());\n\t\t\n        v
\n\n# Code\n```\nclass Solution {\npublic:\n   bool reorderedPowerOf2(int n) {\n        string s = to_string(n);\n        sort(s.begin(),s.end());\n\t\t\n        vector<string> power;\n        for(int i=0;i<=30;i++){\n            int p = pow(2,i);\n            power.push_back(to_string(p));\n        }\n        \n        for(int i=0;i<=30;i++){\n            sort(power[i].begin(),power[i].end());\n        }\n        \n        for(int i=0;i<=30;i++){\n            if(power[i] == s ) return true;\n        }\n        return false;\n    }\n};\n```
['C++']