Available question text
Given two equal-length arrays, compute the maximum value of |arr1[i]-arr1[j]| + |arr2[i]-arr2[j]| + |i-j| over all pairs (i,j) by observing the expression reduces to a constant set of sign patterns; evaluate the four resulting linear forms across indices and take the largest max−min difference (O(n) time).
Related questions
Continue with questions that share topics or the same question type.
- Find the Maximum Ancestor Value Across All Leaf Nodes in a Binary Tree
Coding
- Find the Maximum Sequence Value of Array
Coding
- Given an array nums and a sliding window of size k moving from the very left to the very right, return the maximum value in the window for each position. Solve in O(n) time using a deque.
Coding
- Maximum Absolute Sum of Any Subarray
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1131. Maximum of Absolute Value Expression
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source