You are viewing a single comment's thread. Return to all comments →
public static int flippingMatrix(List> matrix) { var count = matrix.Count; int sum = 0;
for(int i = 0 ; i < count/2 ; i++ ) { for(int j = 0 ; j < (matrix[i].Count)/2 ; j++ ) { sum += FindMax(matrix[i][j],matrix[i][count-j-1],matrix[count-i-1][j],matrix[count-i-1][count-j-1]); } } return sum; }
static int FindMax(params int[] numbers) {
int max = numbers.Max(); return max; }
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 →
public static int flippingMatrix(List> matrix) { var count = matrix.Count; int sum = 0;
static int FindMax(params int[] numbers) {