C++||Easy understand||
core concept\nWe can use 2147483648%numto determinenum is power of 2 or not.\nI hope this concept can help you~~~\nif you think this is useful, please upvoted i
# core concept\nWe can use `2147483648%num`to determine` num` is power of 2 or not.\nI hope this concept can help you~~~\nif you think this is useful, please upvoted it to let more people see this article.\n```\nclass Solution {\npublic:\n    bool reorderedPowerOf2(int n) {\n        string s=to_string(n);\n        sort(s.begin(),s.end());\n        do{\n            if(2147483648%stoi(s)==0&&s[0]!=\'0\') return 1;\n        }while(next_permutation(s.begin(), s.end()));\n        return 0;\n    }\n};\n```
[]