<p>Given an integer array <code>arr</code> and a target value <code>target</code>, return the integer <code>value</code> such that when we change all the integers larger than <code>value</code> in the given array to be equal to <code>value</code>, the sum of the array gets as close as possible (in absolute difference) to <code>target</code>.</p>
<p>In case of a tie, return the minimum such integer.</p>
<p>Notice that the answer is not neccesarilly a number from <code>arr</code>.</p>