Daily challenge for 2025-02-04
35. Counting Bits
Write a function solve that returns an array of the number of 1-bits (Hamming weight) for each number from 0 to n.
Example:Input: 2Output: [0,1,1]
Run this challenge interactively in Python or JavaScript when the app loads.