{"id":"max-sum-is-closed-form","text":"`max_sum` computes the answer in O(1) time with no loops or data structures, reducing the greedy pick strategy to `min(k, numOnes) - max(0, k - numOnes - numZeros)`.","truth_value":"IN","source":"entries/2026/06/06/k-items-with-the-maximum-sum-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":["closed-form-reduction-eliminates-iteration"],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"max-sum-is-closed-form","truth_value":"IN","reason":"premise"}]}}