Maximize a sum of absolute differences over index pairs of two arrays
Company: Zapier
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Other
Overview: Given two integer arrays of equal length, find the largest value of |arr1[i] - arr1[j]| + |arr2[i] - arr2[j]| + |i - j| over all index pairs. It tests reasoning about absolute values and reducing an all-pairs search to a few linear scans.