You are viewing a single comment's thread. Return to all comments →
Python3: 1 line
def diagonalDifference(arr): return abs(sum([arr[i][i] for i in range(len(arr))]) - sum([arr[(len(arr)-1)-i][i] for i in range(len(arr)-1,-1,-1)]))
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 →
Python3: 1 line