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