```
class Solution(object):
def maximumGap(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
l = len(nums)
if l<=1:
return 0
else:
s = []
nums.sort()
for i in range(l-1):
x = nums[i+1]-nums[i]
s.append(x)
return max(s)
```