Bit Counting

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 of1234is10011010010, so the function should return5in this case

https://www.codewars.com/kata/bit-counting/csharp

results matching ""

    No results matching ""