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