input: Write a function that takes an array of numbers and returns an array with the greatest and smallest values.
  
  assert min_max([3, 4, 2, 8, 15, 6])==[2, 15]
  assert min_max([10, -5, 3, 27, 1])==[-5, 27]
  assert min_max([4, 4, 4, 4, 4])==[4, 4]
  assert min_max([])==[]
  assert min_max([-10, -20, -30, -40])==[-40, -10]
output: def min_max(arr):
      if not arr:
          return []
      return [min(arr), max(arr)]