Domanda di colloquio di Google

How would you approach this question?