Pergunta de entrevista da empresa Google

There were two questions per interview, one that tests more coding, and one that tests more problem-solving skills.