Given an integer array nums, choose indices i and j such that i < j and nums[i] < nums[j]. Define the value of this pair as nums[j] - nums[i].
Return the maximum possible value over all valid pairs. If no valid pair exists, return
Constraints:
n == nums.length
n
nums[i]
Given an integer array nums, choose indices i and j such that i < j and nums[i] < nums[j]. Define the value of this pair as nums[j] - nums[i].
Return the maximum possible value over all valid pairs. If no valid pair exists, return
Constraints:
n == nums.length
n
nums[i]