Question d’entretien chez Alloy

One medium difficulty HackerRank question