input: Write a function to take an array of numbers and return an array with the greatest and smallest values.
  assert min_max([3, 4, 2, 8, 15, 6])==[2, 15]
  assert min_max([100, 0, -5, 33, 99])==[-5, 100]
  assert min_max([])==[]
  assert min_max([7])==[7, 7]
  assert min_max([-1, -2, -3, -4, -5])==[-5, -1]
output: def min_max(arr):
      if not arr:
          return []
      return [min(arr), max(arr)]