Simple Solution using Next Permutation to find the Answer
\nclass Solution {\npublic:\n    vector<int> tovector(int n){\n        vector<int> ans;\n        while(n!=0){\n            ans.push_back(n%10);\n            n =
```\nclass Solution {\npublic:\n    vector<int> tovector(int n){\n        vector<int> ans;\n        while(n!=0){\n            ans.push_back(n%10);\n            n = n/10;\n        }\n        sort(ans.begin(),ans.end());\n        return ans;\n    }\n    // [5,2,1]\n    \n    int toInteger(vector<int> &ans){\n        int nums = 0;\n        for(auto x : ans){\n            nums = nums*10 + x;\n        }\n        return nums;\n    }\n    bool reorderedPowerOf2(int n) {\n      vector<int> vec = tovector(n);\n      do{\n          if(vec.size() == 1 && vec[0] == 1) return true;\n          if(vec[0] == 0 ||((vec[vec.size()-1]%2 ==1))){\n              continue;\n          }\n          int n = toInteger(vec);\n          if((n &(n-1)) == 0) return true;\n          \n      }while(next_permutation(vec.begin(),vec.end()));\n      return false;\n    }\n    \n};\n```
['C', 'Sorting', 'C++']