Given a non-negative integer n, return the number of set bits (1s) in its binary representation (also known as its Hamming weight).
Input / output
n: int (0 <= n <= 2^31 - 1)int — count of 1 bits in n0 <= n <= 2^31 - 1 (2147483647)If hamming_weight is called millions of times in a tight loop, how can a small 256-entry byte lookup table answer each 32-bit query in 4 table lookups?