Skip to content

Files

Latest commit

fc9267d · Feb 22, 2018

History

History
12 lines (7 loc) · 336 Bytes

README.md

File metadata and controls

12 lines (7 loc) · 336 Bytes

133.Counting Bits

Description

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.

Example: For num = 5 you should return [0,1,1,2,1,2].

From

LeetCode