|
| 1 | +<h2><a href="https://leetcode.com/problems/reordered-power-of-2">Reordered Power of 2</a></h2> <img src='https://img.shields.io/badge/Difficulty-Medium-orange' alt='Difficulty: Medium' /><hr><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> |
| 2 | + |
| 3 | +<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> |
| 4 | + |
| 5 | +<p> </p> |
| 6 | +<p><strong class="example">Example 1:</strong></p> |
| 7 | + |
| 8 | +<pre> |
| 9 | +<strong>Input:</strong> n = 1 |
| 10 | +<strong>Output:</strong> true |
| 11 | +</pre> |
| 12 | + |
| 13 | +<p><strong class="example">Example 2:</strong></p> |
| 14 | + |
| 15 | +<pre> |
| 16 | +<strong>Input:</strong> n = 10 |
| 17 | +<strong>Output:</strong> false |
| 18 | +</pre> |
| 19 | + |
| 20 | +<p> </p> |
| 21 | +<p><strong>Constraints:</strong></p> |
| 22 | + |
| 23 | +<ul> |
| 24 | + <li><code>1 <= n <= 10<sup>9</sup></code></li> |
| 25 | +</ul> |
0 commit comments