Skip to content

Commit 08c3e38

Browse files
refactor 1196
1 parent d581569 commit 08c3e38

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,6 @@
22

33
import java.util.Arrays;
44

5-
/**
6-
* 1196. How Many Apples Can You Put into the Basket
7-
*
8-
* You have some apples, where arr[i] is the weight of the i-th apple. You also have a basket that can carry up to 5000 units of weight.
9-
* Return the maximum number of apples you can put in the basket.
10-
*
11-
* Example 1:
12-
* Input: arr = [100,200,150,1000]
13-
* Output: 4
14-
* Explanation: All 4 apples can be carried by the basket since their sum of weights is 1450.
15-
*
16-
* Example 2:
17-
* Input: arr = [900,950,800,1000,700,800]
18-
* Output: 5
19-
* Explanation: The sum of weights of the 6 apples exceeds 5000 so we choose any 5 of them.
20-
*
21-
* Constraints:
22-
* 1 <= arr.length <= 10^3
23-
* 1 <= arr[i] <= 10^3
24-
* */
255
public class _1196 {
266
public static class Solution1 {
277
public int maxNumberOfApples(int[] arr) {

0 commit comments

Comments
 (0)