Traveloka interview question

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