Pay attention to the before/after states. Usually you will wish to create a separate array to assign the modified values, which you can copy over the original array when you are done.
Sometimes the update operations are designed to modify the array as you go.
Decide which of these two cases apply and good luck!