Question d’entretien chez Google

How would you solve this problem?