Domanda di colloquio di Microsoft

How would you solve this problem.