Given a positive integer n, write a function that returns the number of set bits in its binary representation (also known as the Hamming weight).
n
A set bit is a bit that has a value of 1.
1
1 <= n <= 2^31 - 1
n = 11
3
n = 128
n = 2147483645
30