We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4738856 commit 0544edeCopy full SHA for 0544ede
src/main/java/g1701_1800/s1755_closest_subsequence_sum/Solution.java
@@ -12,7 +12,7 @@ public class Solution {
12
public int minAbsDifference(int[] nums, int goal) {
13
int n = nums.length;
14
int nFirst = (int) Math.pow(2, (double) n / 2);
15
- int nSecond = (int) Math.pow(2, n - (double) n / 2);
+ int nSecond = (int) Math.pow(2, (double) (n - n / 2));
16
int[] first = new int[nFirst];
17
int[] second = new int[nSecond];
18
helper(nums, first, 0, n / 2 - 1);
0 commit comments