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