input: Write a function called `min_max` that takes an array of numbers and returns an array containing the smallest and greatest values in that array. If the given array is empty, return an empty array.
  
  assert min_max([3, 4, 2, 8, 15, 6]) == [2, 15]
  assert min_max([5]) == [5, 5]
  assert min_max([]) == []
  assert min_max([-3, -5, -1, -2, -4]) == [-5, -1]
output: def min_max(arr):
      if not arr:
          return []
      return [min(arr), max(arr)]