2023-09-01 06:55:13 +0000 UTC
Counting Bits
Categories:
Links
Code
class Solution:
def countBits(self, n: int) -> List[int]:
return tuple(bin(i).count("1") for i in range(n + 1))
class Solution:
def countBits(self, n: int) -> List[int]:
return tuple(bin(i).count("1") for i in range(n + 1))