Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 320 Bytes

869.md

File metadata and controls

23 lines (14 loc) · 320 Bytes

Reordered Power of 2

Description

link


Solution

  • See Code

Code

class Solution:
    def reorderedPowerOf2(self, N: int) -> bool:
        return sorted(str(N)) in [sorted(str(1 << i)) for i in range(30)]