Platfora Interview Question

Simple array manipulation question