<p>Given two arrays of integers with equal lengths, return the maximum value of:</p>

<p><code>|arr1[i] - arr1[j]| + |arr2[i] - arr2[j]| + |i - j|</code></p>

<p>where the maximum is taken over all <code>0 &lt;= i, j &lt; arr1.length</code>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre>
<strong>Input:</strong> arr1 = [1,2,3,4], arr2 = [-1,4,5,6]
<strong>Output:</strong> 13
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre>
<strong>Input:</strong> arr1 = [1,-2,-5,0,10], arr2 = [0,-2,-1,-7,-4]
<strong>Output:</strong> 20
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>2 &lt;= arr1.length == arr2.length &lt;= 40000</code></li>
	<li><code>-10^6 &lt;= arr1[i], arr2[i] &lt;= 10^6</code></li>
</ul>

class Solution:
    def maxAbsValExpr(self, arr1: List[int], arr2: List[int]) -> int:
        f1 = arr1[0] + arr2[0]
        f2 = arr1[0] + arr2[0]
        f3 = arr1[0] - arr2[0]
        f4 = arr1[0] - arr2[0]
        g1 = arr1[0] + arr2[0]
        g2 = arr1[0] + arr2[0]
        g3 = arr1[0] - arr2[0]
        g4 = arr1[0] - arr2[0]
        for i in range(len(arr1)):
            f1 = max(f1, arr1[i] + arr2[i] + i)
            f2 = max(f2, arr1[i] + arr2[i] - i)
            f3 = max(f3, arr1[i] - arr2[i] + i)
            f4 = max(f4, arr1[i] - arr2[i] - i)
            g1 = min(g1, arr1[i] + arr2[i] + i)
            g2 = min(g2, arr1[i] + arr2[i] - i)
            g3 = min(g3, arr1[i] - arr2[i] + i)
            g4 = min(g4, arr1[i] - arr2[i] - i)
        return max(max(f1 - g1, f2 - g2), max(f3 - g3, f4 - g4))
24000