simple and easy C++ solution 😍❤️‍🔥
if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n\n\n# Code\n\nclass Solution {\npublic:\n    bool reorderedPowerOf2(int n) \n    {\n        if(n==1) return 
# if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n\n\n# Code\n```\nclass Solution {\npublic:\n    bool reorderedPowerOf2(int n) \n    {\n        if(n==1) return true;\n\n        string target = to_string(n), temp;\n        sort(target.begin(), target.end());\n        for(int i=1;i<=32;i++)\n        {\n            long long val = pow(2, i);\n            temp = to_string(val);\n            sort(temp.begin(), temp.end());\n            if(temp == target) return true;\n        }\n        return false;\n    }\n};\n```
['Hash Table', 'Math', 'Sorting', 'Counting', 'C++']