Apply n-1 operations to an array of non-negative integers, based on the conditions mentioned.Perform multiplication and set values to 0 based on the conditions in each operation.Shift all the zeros to the end of the array.Return the resulting array.