Pergunta de entrevista da empresa Google

How would you approach this question?