Advertisement
Josif_tepe

Untitled

Dec 30th, 2022
931
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.14 KB | None | 0 0
  1. class Solution {
  2. public:
  3.     int hammingWeight(uint32_t n) {
  4.        int result = __builtin_popcount(n);
  5.        return result;
  6.     }
  7. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement