Pergunta de entrevista da empresa NYU (New York University)

How can you solve this problem?