Search⌘ K
AI Features

Sum of Mutated Array Closest to Target

Sum of Mutated Array Closest to Target asks you to choose an integer cap so replacing larger array values with it produces a sum closest to the target, breaking ties with the smaller cap.

Statement

Given an integer array arr and a target value target, find an integer value ...