100% FASTER || EASY TO UNDERSTAND [JAVA CODE]
\nclass Solution {\n    public int maximumDifference(int[] nums) {\n        int min = nums[0];\n        int diff = -1;\n        \n        for(int i=1; i<nums.le
```\nclass Solution {\n    public int maximumDifference(int[] nums) {\n        int min = nums[0];\n        int diff = -1;\n        \n        for(int i=1; i<nums.length; i++){\n            if(nums[i] > min){\n                int d=nums[i]-min;\n                diff = Math.max(diff, d);\n            }else{\n                min = nums[i];\n            }\n        }\n        \n        return diff;\n    }\n}\n```
[]