[JAVA] Easy, Clean and Concise Solution - O(N) - 0ms - Faster than 100%
\nclass Solution {\n    public int maximumDifference(int[] nums) {\n        int min = Integer.MAX_VALUE;\n        int ans = -1;\n        for(int i = 0; i < nums
```\nclass Solution {\n    public int maximumDifference(int[] nums) {\n        int min = Integer.MAX_VALUE;\n        int ans = -1;\n        for(int i = 0; i < nums.length; i++){\n            if(nums[i] > min){\n                if(nums[i] - min > ans)\n                    ans = nums[i] - min;\n            }else\n                min = nums[i];\n        }\n        return ans;\n    }\n}\n```
['Java']