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'. The function should take one argument 'arr' which is an array of numbers. The function should return an array with exactly two elements: the minimum value of 'arr' at index 0 and the maximum value of 'arr' at index 1.
  
  def min_max(arr):
    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, 2, 3, 4, 5])==[1, 5]
  assert min_max([0, -1, 100, -100, 50])==[-100, 100]
  assert min_max([-5, -3, -1, -2, -4])==[-5, -1]
  assert min_max([])==[]
output: def min_max(arr):
    if not arr:
      return []
    min_val = min(arr)
    max_val = max(arr)
    return [min_val, max_val]