Question d’entretien chez Appian

How would you code this solution