Question d’entretien chez Mews

Easy algorithm question from the manager ; )