Given a positive integer , return the number of set bits (1s) in its binary representation. This is also known as the Hamming weight.
Example: For (binary 1011), return .
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
Given a positive integer , return the number of set bits (1s) in its binary representation. This is also known as the Hamming weight.
Example: For (binary 1011), return .