Amazon Interview Question

The first question was a leetcode easy, something to do with arrays.