Google Interview Question

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