You are viewing a single comment's thread. Return to all comments →
public static int diagonalDifference(List<List<Integer>> arr) { int result = 0; for(int i = 0; i<arr.size(); i++){ result += arr.get(i).get(i) - arr.get(i).get(arr.size() -i - 1); } return Math.abs(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 →