input: Write a function to find the maximum difference between any two elements in an array.
  assert max_diff([10, 3, 1, 7, 4, 5, 8]) == 7
  assert max_diff([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9
  assert max_diff([100, 90, 80, 70, 60, 50]) == -10
output: def max_diff(arr):
      if not arr or len(arr) < 2:
          return 0
      return max(arr) - min(arr)