------
## 最终结论
```python
def maximum_difference(arr):
    if len(arr) < 2:
        return 0
    arr.sort()  # Sort the array
    max_diff = 0
    for i in range(1, len(arr)):
        diff = arr[i] - arr[i - 1]
        max_diff = max(max_diff, diff)
    return max_diff
```