NeetCode #814LC-1975MediumGreedy
← Back to All Problems

#814 · #1975 · Maximum Matrix Sum(最大方阵和)

📌 Problem Statement & Constraints

You are given an m x n integer matrix. An operation chooses two adjacent cells (sharing a side) and multiplies both by -1. You may apply the operation any number of times. Return the maximum possible sum of the matrix. Constraints: 2 <= m, n <= 250, -10^5 <= matrix[i][j] <= 10^5.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!