Goldman Sachs Interview Question

tries and a question on arrays