vJechsmayr / PythonAlgorithms

All Algorithms implemented in Python 3 a project for hacktoberfest2020 - NO Issues or PRs for hacktoberfest 2021
MIT License
132 stars 367 forks source link

0869 - Reordered Power of 2 #753

Closed conradojordan closed 3 years ago

conradojordan commented 4 years ago

Description of the Problem

Starting with a positive 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 in a way such that the resulting number is a power of 2.

Code

class Solution:
    def reorderedPowerOf2(self, N: int) -> bool:

Link To The LeetCode Problem

LeetCode

conradojordan commented 4 years ago

I would like to be assigned this issue, if possible

vJechsmayr commented 4 years ago

@conradojordan Waiting for your PR 😸