All Downloads are FREE. Search and download functionalities are using the official Maven repository.

g0801_0900.s0869_reordered_power_of_2.readme.md Maven / Gradle / Ivy

There is a newer version: 1.37
Show newest version
869\. Reordered Power of 2

Medium

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

Return `true` _if and only if we can do this so that the resulting number is a power of two_.

**Example 1:**

**Input:** n = 1

**Output:** true

**Example 2:**

**Input:** n = 10

**Output:** false

**Constraints:**

*   1 <= n <= 109




© 2015 - 2024 Weber Informatics LLC | Privacy Policy