for a given array of integers, perform operations on the array. return the resulting array after all operations have been applied in the order given. Each operation contains two