<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:
        # maxsum=0
        # for i in range(len(arr1)-1,-1,-1):
        #     for j in range(len(arr1)-1,-1,-1):
        #         arrsum = abs(arr1[i]-arr1[j]) + abs(arr2[i]-arr2[j]) + abs(i-j)
        #         if arrsum> maxsum:
        #             maxsum = arrsum
        # return maxsum

        max1=max2=max3=max4=-10^6
        min1=min2=min3=min4=10^6
        for i in range(0, len(arr1)):
            max1 = max(max1, (arr1[i]+arr2[i]+i))
            min1 = min(min1, (arr1[i]+arr2[i]+i))

            max2 = max(max2, (arr1[i]+arr2[i]-i))
            min2 = min(min2, (arr1[i]+arr2[i]-i))

            max3 = max(max3, (arr1[i]-arr2[i]+i))
            min3 = min(min3, (arr1[i]-arr2[i]+i))

            max4 = max(max4, (arr1[i]-arr2[i]-i))
            min4 = min(min4, (arr1[i]-arr2[i]-i))
        print('max1, min1: ',max1, ' ', min1)
        print('max2, min2: ',max2, ' ', min2)
        print('max3, min3: ',max3, ' ', min3)
        print('max4, min4: ',max4, ' ', min4)
        final_res = max((max1-min1), (max2-min2), (max3-min3), (max4-min4))
        return final_res
            

23700