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
Medium > Counting Bits > Flashcards
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.