You are viewing a single comment's thread. Return to all comments →
I had a slightly nuanced approach to what most people did, thought I'd share. Python
def diagonalDifference(arr): length = len(arr) diff = 0 for i in range(0, length): diff = diff - (arr[i][i] - arr[i][length-(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 →
I had a slightly nuanced approach to what most people did, thought I'd share. Python