input: Write a function to return an array with the greatest and smallest values from a given array of numbers. If the input array is empty, return an empty array.
  min_max([3, 4, 2, 8, 15, 6])==[2, 15]
  min_max([5])==[5, 5]
  min_max([10, 20, 30])==[10, 30]
  min_max([])==[]
  min_max([-1, -5, -3, 0, 5])==[-5, 5]
output: def min_max(arr):
      if not arr:
          return []
      return [min(arr), max(arr)]