Counting Bits Flashcards

1
Q

Counting Bits

Given a non-negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1’s in their binary representation and return them as an array.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly