Pergunta de entrevista da empresa Google

Cannot say the exact question but it was based on arrays,