Domanda di colloquio di Apple

How would you tackle this problem?