Given a positive integer n, return the number of set bits in its binary representation, also known as the Hamming weight.
Click Run to execute sample tests.