Question d’entretien chez Arista Networks

1st stage: HackerRank easy to medium problem