C++ | Easy solution
\nclass Solution {\npublic:\n    \nbool isPowerOfTwo(int n) {        \n    if(n==0)\n        return 0;\n        \n    if(ceil(log2(n)) == floor(log2(n)))\n     
```\nclass Solution {\npublic:\n    \nbool isPowerOfTwo(int n) {        \n    if(n==0)\n        return 0;\n        \n    if(ceil(log2(n)) == floor(log2(n)))\n        return 1;\n    else\n        return 0;            \n}\n    \n    \nbool reorderedPowerOf2(int n) {\n        \n    string num = to_string(n);\n    sort(num.begin(),num.end());\n    \n    do{ \n        if(num[0]==\'0\')                //edge case\n            continue;\n\t\t\t\n        if(isPowerOfTwo(stoi(num)))\n            return 1;        \n    }while(next_permutation(num.begin(),num.end()));     \n    \n\treturn 0;\n}\n};\n```
['C', 'Probability and Statistics']