You are viewing a single comment's thread. Return to all comments →
JAVA BEST SOLUTION
public static int flippingMatrix(List<List<Integer>> matrix) { int len=matrix.size(); int total=0; for(int i=0;i<len/2;i++){ for(int j=0;j<len/2;j++){ total+=Math.max(Math.max(matrix.get(i).get(j),matrix.get(i).get(len-j-1)),Math.max((matrix.get(len-i-1).get(len-j-1)),matrix.get(len-1-i).get(j))); } } return total; }
Seems like cookies are disabled on this browser, please enable them to open this website
Flipping the Matrix
You are viewing a single comment's thread. Return to all comments →
JAVA BEST SOLUTION