Search
⌘K

Leetcode 1005. Maximize Sum Of Array After K Negations

Given an integer array and k sign-flip operations, maximize the array sum by choosing which elements to negate. The core challenge is a greedy selection of the most negative values to flip first, then handling leftover flips by parity (possibly flipping the element with smallest absolute value).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.