Skip to content

Commit 48f8168

Browse files
authored
Update Solution.java
1 parent 0544ede commit 48f8168

File tree

1 file changed

+2
-1
lines changed
  • src/main/java/g1701_1800/s1755_closest_subsequence_sum

1 file changed

+2
-1
lines changed

src/main/java/g1701_1800/s1755_closest_subsequence_sum/Solution.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55

66
import java.util.Arrays;
77

8+
@SuppressWarnings("java:S2184")
89
public class Solution {
910
private int idx;
1011
private int sum;
1112

1213
public int minAbsDifference(int[] nums, int goal) {
1314
int n = nums.length;
1415
int nFirst = (int) Math.pow(2, (double) n / 2);
15-
int nSecond = (int) Math.pow(2, (double) (n - n / 2));
16+
int nSecond = (int) Math.pow(2, n - n / 2);
1617
int[] first = new int[nFirst];
1718
int[] second = new int[nSecond];
1819
helper(nums, first, 0, n / 2 - 1);

0 commit comments

Comments
 (0)