c++ simple  straight forward solution
\nclass Solution {\npublic:\n    bool checkdigits(int n,vector<int>&v)\n    {\n        vector<int>v1(10,-1);\n        while(n)\n        {\n            v1[n%10]+
```\nclass Solution {\npublic:\n    bool checkdigits(int n,vector<int>&v)\n    {\n        vector<int>v1(10,-1);\n        while(n)\n        {\n            v1[n%10]++;\n            n=n/10;\n        }\n        if(v1==v)\n            return true;\n        return false;\n    }\n    bool reorderedPowerOf2(int n) {\n        vector<int>v(10,-1);\n        while(n)\n        {\n            v[n%10]++;\n            n=n/10;\n        }\n        int num=1;\n        for(int i=1;i<=30;i++)\n        {\n            if(checkdigits(num,v))\n                return true;\n            num=num*2;\n        }\n        return false;\n    }\n};\n```
[]