You are viewing a single comment's thread. Return to all comments →
def diagonalDifference(arr): f_p=0 s_p=0 for i in range(len(arr)): f_p+=arr[i][i] s_p+=arr[len(arr)-1-i][i] return abs(f_p-s_p)
Seems like cookies are disabled on this browser, please enable them to open this website
Diagonal Difference
You are viewing a single comment's thread. Return to all comments →