Skip to content

Commit 0544ede

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

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class Solution {
1212
public int minAbsDifference(int[] nums, int goal) {
1313
int n = nums.length;
1414
int nFirst = (int) Math.pow(2, (double) n / 2);
15-
int nSecond = (int) Math.pow(2, n - (double) n / 2);
15+
int nSecond = (int) Math.pow(2, (double) (n - n / 2));
1616
int[] first = new int[nFirst];
1717
int[] second = new int[nSecond];
1818
helper(nums, first, 0, n / 2 - 1);

0 commit comments

Comments
 (0)