Pregunta de entrevista de Qualcomm

Find number of 1 bits. Find duplicates in an array