input: Write a python function to optimize an array so that the sum of elements is maximized and all elements are greater than 0.
  assert optimize_array([1, -2, 3, 4, -5]) == [1, 0, 3, 4, 0]
  assert optimize_array([-1, -2, -3, -4, -5]) == [0, 0, 0, 0, 0]
  assert optimize_array([10, -10, 20, -20, 30, -30]) == [10, 0, 20, 0, 30, 0]
output: def optimize_array(arr):
      return [max(0, x) for x in arr]