Qualcomm Interview Question

Find number of 1 bits. Find duplicates in an array