Question d’entretien chez McKinsey & Company

algorithm question, all not hard