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