191. Number of 1 Bits class Solution: def hammingWeight(self, n: int) -> int: res = 0 while n: # n > 0: res += n % 2 # res += n&1 n = n >> 1 # n = n // 2 return res https://youtu.be/5Km3utixwZs?si=f7G0eyMnnaO_-VMR class Solution: def hammingWeight(self, n: int) -> int: res = 0 while n: # n > 0: n &= (n-1) # n = n & ..