You are viewing a single comment's thread. Return to all comments →
Here is my Python solution!
def flippingMatrix(matrix): subarraysum = 0 for i in range(len(matrix) // 2): for j in range(len(matrix) // 2): subarraysum += max((matrix[i][j], matrix[-i - 1][j], matrix[i][-j - 1], matrix[-i - 1][-j - 1])) return subarraysum
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 →
Here is my Python solution!