Java Simple and easy solution,1 ms, faster than 96.64%, T O(1), S O(1) clean code with comments.
PLEASE UPVOTE IF YOU LIKE THIS SOLUTION\n\n\n\nclass Solution {\n    //store all the power of 2 digits,\n    //only do this operation 1 time\n    static PowerOf
**PLEASE UPVOTE IF YOU LIKE THIS SOLUTION**\n\n\n```\nclass Solution {\n    //store all the power of 2 digits,\n    //only do this operation 1 time\n    static PowerOfTwo powerOfTwo = new PowerOfTwo();\n    \n    public boolean reorderedPowerOf2(int N) {\n        String numDigit = String.valueOf(N);\n        \n        /*\n            Approach\n            1. calculate one time only, power of 2\n               and store \n            2. for given number, if its digit is anagram of any\n               stored power of 2 digits, return true otherwise false\n            3. Time O(1), Space O(1)\n        */\n        \n        \n        for(String power : powerOfTwo.digits){\n            if(isAnagrams(power, numDigit)){\n                return true;\n            }\n        }\n        \n        return false;\n    }\n    \n    \n    private boolean isAnagrams(String str1, String str2){\n        if(str1.length() != str2.length()) return false;\n        \n        int[] counts = new int[10];\n        \n        for(char digit : str1.toCharArray()){\n            counts[digit - \'0\']++;\n        }\n        \n        for(char digit : str2.toCharArray()){\n            counts[digit - \'0\']--;\n        }\n        \n        for(int count : counts){\n            if(count != 0) return false;\n        }\n\n        return true;\n    }\n}\n\nclass PowerOfTwo{\n    String[]  digits;\n    \n    public PowerOfTwo(){\n        digits = new String[30];\n        \n        for(int i = 0; i < digits.length; i++){\n            digits[i] = String.valueOf((1 << i));\n        }\n    }\n    \n}\n```
['Java']