LeetCode 191 Number of 1 Bits
https://en.wikipedia.org/wiki/Hamming_weight
int hammingWeight(uint32_t n) { int num=0; while(n!=0) { n&=(n-1); num++; } return num; }
LeetCode 191 Number of 1 Bits
https://en.wikipedia.org/wiki/Hamming_weight
int hammingWeight(uint32_t n) { int num=0; while(n!=0) { n&=(n-1); num++; } return num; }