Lyft interview question

One coding question on integer array manipulation