Lyft Interview Question

One coding question on integer array manipulation