Given an integer n, return an array ans of length n + 1 where ans[i] is the number of 1 bits in the binary representation of i, for every i from 0 to n.
n
ans
n + 1
ans[i]
1
i
0
2
5
8
10