<p>You are given an integer <code>n</code>. We reorder the digits in any order (including the original order) such that the leading digit is not zero.</p>

<p>Return <code>true</code> <em>if and only if we can do this so that the resulting number is a power of two</em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre>
<strong>Input:</strong> n = 1
<strong>Output:</strong> true
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre>
<strong>Input:</strong> n = 10
<strong>Output:</strong> false
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= n &lt;= 10<sup>9</sup></code></li>
</ul>

class Solution {
public:
    bool reorderedPowerOf2(int n) {
        string s=to_string(n);
        unordered_map<char,int> mp1;
        for(int i=0;i<s.size();i++){
            mp1[s[i]]++;
        }
        vector<int> poweroftwo;
        for(int i=0;pow(2,i)<=1e9;i++){
            poweroftwo.push_back(pow(2,i));
        }
        for(int i=0;i<poweroftwo.size();i++){
            string s=to_string(poweroftwo[i]);
            unordered_map<char,int> mp2;
            for(int j=0;j<s.size();j++){
                mp2[s[j]]++;
            }
            if(mp1==mp2){
                return true;
            }
        }
        return false;
    }
};
11200