Your question is Maximize Sum After K Reversals. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given an integer array nums and an integer k, perform exactly k sign reversals on elements of the array. Each reversal toggles one element from positive to negative or negative to positive. Return the maximum possible sum of the array after all reversals.