Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 297 Bytes

Bit Counting.md

File metadata and controls

5 lines (3 loc) · 297 Bytes

Write a function that takes an (unsigned) integer as input, and returns the number of bits that are equal to one in the binary representation of that number.

Example: The binary representation of 1234 is 10011010010, so the function should return 5

solution