O(n)-python solution


#1

class Solution:
# @param A : list of integers
# @return an integer
def maxArr(self,A):
a=[]
b=[]
for i in range(len(A)):
a.append(A[i]+i)
b.append(A[i]-i)

    return max(max(a)-min(a),max(b)-min(b))

#2

hey brother can you please explain the code, i found same code but i am not able to clear the logic