869. Reordered Power of 2
Medium
Input: n = 1
Output:
trueInput: n = 10
Output:
falseclass Solution:
def reorderedPowerOf2(self, n: int) -> bool:
#.
count = collections.Counter(str(n))
return any(count == collections.Counter(str(1 << i)) for i in range(30))Last updated