You are given two integer arrays nums and target of equal length.
In a single operation, you can choose any contiguous subarray of nums and increment or decrement all values within that subarray by
Return the minimum number of operations needed to transform nums into target.
Constraints:
nums.length target.length
nums[i], target[i]
You are given two integer arrays nums and target of equal length.
In a single operation, you can choose any contiguous subarray of nums and increment or decrement all values within that subarray by
Return the minimum number of operations needed to transform nums into target.
Constraints:
nums.length target.length
nums[i], target[i]