SIMPLE C++ SOLUTION
\nclass Solution {\npublic:\n    bool reorderedPowerOf2(int n) {\n        if(n == 1) return true;\n        unordered_map<int, int> map;\n        \n        strin
```\nclass Solution {\npublic:\n    bool reorderedPowerOf2(int n) {\n        if(n == 1) return true;\n        unordered_map<int, int> map;\n        \n        string temp = to_string(n);\n        for(int i = 0; i < temp.size(); i++){\n            map[int(temp[i])-48]++;\n        }  \n        \n        int digits = temp.size();\n        return helper(map, 1, n, digits);\n    }\n    \n    bool helper(unordered_map<int, int> map, long k, int s, int digits){\n        if(k > pow(10, digits) - 1) return false;\n        if(k == s) return true;\n        \n        unordered_map<int, int> copy = map;\n        \n        string temp = to_string(k);\n        for(int i = 0; i < temp.size(); i++){\n            copy[int(temp[i])-48]--;\n        }\n        \n        for(auto &it: copy){\n            if(it.second != 0) return helper(map, k*2, s, digits);\n        }\n        \n        return true;\n    }\n};\n```
['C', 'Python', 'C++', 'Java', 'Python3', 'JavaScript']