{"id":"greedy-flip-negatives-first","text":"The k-negations algorithm sorts to place negatives first and greedily flips them; this is optimal because flipping a negative yields +2|x| gain versus flipping a positive which yields -2|x| loss.","truth_value":"IN","source":"entries/2026/06/06/maximize-sum-of-array-after-k-negations-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"greedy-flip-negatives-first","truth_value":"IN","reason":"premise"}]}}