input: Write a function that takes an array of numbers and returns an array with the greatest and smallest values. The function should be named `min_max` and take one parameter `arr`. Use the built-in `min` and `max` functions to find the smallest and greatest values in the array, respectively.
  
  assert min_max([3, 4, 2, 8, 15, 6])==[2, 15]
  assert min_max([7, 3, 9, 2, 10])==[2, 10]
  assert min_max([1, 1, 1, 1])==[1, 1]
  assert min_max([100])==[100, 100]
  assert min_max([])==[]
output: def min_max(arr):
      if not arr:
          return []
      return [min(arr), max(arr)]