Problem 1300 · Medium

Sum of Mutated Array Closest to Target

Choose an integer cap making the capped sum closest to the target, preferring the smaller cap on ties.

Open the interactive visualisation