Skip to content

Instantly share code, notes, and snippets.

@terracotta-ko
Created May 1, 2017 09:11
gist for leetcode 191
class Solution {
public:
int hammingWeight(uint32_t n) {
return bitset<32>(n).count();
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment