Tilt interview question

Simple array manipulation.