338. Counting Bits
https://leetcode.com/problems/counting-bits/
class Solution:
def countBits(self, num: int) -> List[int]:
count = [0] * (1+num)
for i in range(num+1):
add1 = count[i//2]
add2 = i % 2
count[i] = add1 + add2
return countLast updated