Google Interview Question

Two LeetCode medium questions, both focused on arrays.