LeetCode 0191 - Number of 1 Bits
Contents
Number of 1 Bits
Desicription
Write a function that takes an unsigned integer and returns the number of ‘1’ bits it has (also known as the Hamming weight).
Example 1:
1 | Input: 11 |
Example 2:
1 | Input: 128 |
Solution
1 | class Solution { |