Amazon Interview Question

Given an integer array, you need to perform some operations (just prefixes) on the array to make all the elements equal to 0. You can increment or decrement all the elements of the prefix by 1.