c++(0ms 100%) greedy
Runtime: 0 ms, faster than 100.00% of C++ online submissions for Maximum Difference Between Increasing Elements.\nMemory Usage: 8.3 MB, less than 42.76% of C++ 
Runtime: 0 ms, faster than 100.00% of C++ online submissions for Maximum Difference Between Increasing Elements.\nMemory Usage: 8.3 MB, less than 42.76% of C++ online submissions for Maximum Difference Between Increasing Elements.\n```\nclass Solution {\npublic:\n  int maximumDifference(vector<int>& nums) {\n    int mini = nums[0], ans = -1;\n    \n    for(int i = 0; i != nums.size(); i++)\n      if(nums[i] > mini) ans = max(ans, nums[i] - mini);\n      else mini = min(nums[i], mini);\n    \n    return ans;\n  }\n};\n```
['C', 'C++']