# Counting Bits https://leetcode.com/problems/counting-bits/ This solution beats 95.54% in time. ```python ans = [0] * (n + 1) for i in range(1, n + 1): ans[i] = ans[i >> 1] + (i & 1) return ans ```