Pregunta de entrevista de Traveloka

Sort numbers on the basis binary bits set and an array question which I don't remember