Daily Challenge | C++ | 100% FASTER | EASY | HASHING
\nclass Solution {\npublic:\n    bool reorderedPowerOf2(int n) {\n        int arr[10];\n        memset(arr,0,sizeof(arr));\n        \n        int x =n;\n       
```\nclass Solution {\npublic:\n    bool reorderedPowerOf2(int n) {\n        int arr[10];\n        memset(arr,0,sizeof(arr));\n        \n        int x =n;\n        for(;x>0;){\n            int rem = x%10;\n            arr[rem]++;\n            x = x/10;\n        }\n        for(int i=0; i<31; i++){\n            int check[10];\n            memset(check,0,sizeof(check));\n            int y = pow(2,i);\n            while(y>0){\n                int rem = y%10;\n                check[rem]++;\n                y = y/10;\n            }\n            bool flag = true;\n            for(int j=0; j<10; j++){\n                if(arr[j]!=check[j]){\n                    flag = false;\n                    break;\n                }\n            }\n            if(flag){\n                return true;\n            }\n        }\n        return false;\n    }\n};\n```
['C']