8000 refactor 1300 · Skchoudhary/Leetcode@b1c02d8 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b1c02d8

Browse files
refactor 1300
1 parent b534b6b commit b1c02d8

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/main/java/com/fishercoder/solutions/_1300.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 1300. Sum of Mutated Array Closest to Target
5-
*
6-
* Given an integer array arr and a target value target, return the integer value such that when we change all the integers larger than value in the given array to be equal to value,
7-
* the sum of the array gets as close as possible (in absolute difference) to target.
8-
* In case of a tie, return the minimum such integer.
9-
* Notice that the answer is not neccesarilly a number from arr.
10-
*
11-
* Example 1:
12-
* Input: arr = [4,9,3], target = 10
13-
* Output: 3
14-
* Explanation: When using 3 arr converts to [3, 3, 3] which sums 9 and that's the optimal answer.
15-
*
16-
* Example 2:
17-
* Input: arr = [2,3,5], target = 10
18-
* Output: 5
19-
*
20-
* Example 3:
21-
* Input: arr = [60864,25176,27249,21296,20204], target = 56803
22-
* Output: 11361
23-
* */
243
public class _1300 {
254
public static class Solution1 {
265
public int findBestValue(int[] arr, int target) {

0 commit comments

Comments
 (0)
< 2AA0 /div>
0