MathWorks Interview Question

Array question LC easy question