Simple python solution
Here is what I did:\n\npython\nclass Solution:\n    def maximumDifference(self, nums: List[int]) -> int:\n        curmin = nums[0]\n        diff = 0\n        fo
Here is what I did:\n\n```python\nclass Solution:\n    def maximumDifference(self, nums: List[int]) -> int:\n        curmin = nums[0]\n        diff = 0\n        for num in nums:\n            diff = max(diff, num - curmin)\n            curmin = min(curmin, num)\n        return diff or -1\n```\n
['Python']