Platfora interview question

Simple array manipulation question