Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Solution {
- public:
- int hammingWeight(uint32_t n) {
- int result = __builtin_popcount(n);
- return result;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement