You are viewing a single comment's thread. Return to all comments →
def diagonalDifference(arr): # Write your code here ld=rd=0 for i in range(n): ld+=arr[i][i] rd+=arr[i][n-1-i] if ld > rd: return ld - rd else: return rd - ld
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 →