You are viewing a single comment's thread. Return to all comments →
with c
int diagonalDifference(int arr_rows, int arr_columns, int** arr) { int i = 0 , result = 0; for( i=0; i<arr_rows ; i++ ) { result = result + arr[i][i] - arr[i][arr_columns-1-i] ; } return ((result<0) ? ((-1)*result) : (result)); }
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 →
with c