input: Write a Python function that takes an array of numbers and returns an array containing the greatest and smallest values from the input array. If the input array is empty, return an empty array.
  
  def min_max(arr):
    if not arr:
      return []
    return [min(arr), max(arr)]
  
  assert min_max([3, 4, 2, 8, 15, 6]) == [2, 15]
  assert min_max([99, -2, 0, 1000, -100]) == [-100, 1000]
  assert min_max([]) == []
output: def min_max(arr):
    if not arr:
      return []
    return [min(arr), max(arr)]