Amazon Interview Question

Mainly questions about array manipulation.