Goldman Sachs Interview Question

Two Leetcode easy questions involving arrays