Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1975. Maximum Matrix Sum
Given an n×n integer matrix where you may multiply any two adjacent (edge-sharing) elements by -1 any number of times, maximize the matrix sum. Because adjacency flips affect opposite bipartition cells, the optimum is the sum of absolute values of all entries unless the count of negative numbers is odd (and there is no zero), in which case you must subtract twice the smallest absolute value.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.