Leetcode 1937. Maximum Number of Points with Cost
Choose one cell per row to maximize the sum of cell values minus the absolute column-distance cost between consecutive rows; the core challenge is computing DP transitions efficiently (using prefix-max/left-right sweeps) to avoid O(n^2) per row given up to 1e5 total cells.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.