Pergunta de entrevista da empresa GE Digital

Sort an int array by number of one in binary representation