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