Pergunta de entrevista da empresa Google

Two LeetCode medium questions, both focused on arrays.