1131. Maximum of Absolute Value Expression
https://leetcode.com/problems/maximum-of-absolute-value-expression
Description
Given two arrays of integers with equal lengths, return the maximum value of:
|arr1[i] - arr1[j]| + |arr2[i] - arr2[j]| + |i - j|
where the maximum is taken over all 0 <= i, j < arr1.length
.
Example 1:
Example 2:
Constraints:
2 <= arr1.length == arr2.length <= 40000
-10^6 <= arr1[i], arr2[i] <= 10^6
ac
Last updated