You are viewing a single comment's thread. Return to all comments →
Python Solution
def diagonalDifference(arr): n = len(arr) LR = 0 RL = 0 for i in range(n): LR += arr[i][i] RL += arr[n-1-i][i] return abs(LR - RL)
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 →
Python Solution