2016. Maximum Difference Between Increasing Elements
Given a 0-indexed integer array
numsof sizen, find the maximum difference betweennums[i]andnums[j](i.e.,nums[j] - nums[i]), such that0 <= i < j < nandnums[i] < nums[j].Return the maximum difference. If no such
iandjexists, return-1.
1 | class Solution { |