MCPcopy Create free account
hub / github.com/neetcode-gh/leetcode / findTargetSumWays

Method findTargetSumWays

java/0494-target-sum.java:6–9  ·  view source on GitHub ↗
(int[] nums, int S)

Source from the content-addressed store, hash-verified

4 HashMap<String, Integer> dp;
5
6 public int findTargetSumWays(int[] nums, int S) {
7 dp = new HashMap<>();
8 return calculate(nums, 0, 0, S);
9 }
10
11 public int calculate(int[] nums, int i, int sum, int S) {
12 String s = i + "," + sum;

Callers

nothing calls this directly

Calls 1

calculateMethod · 0.95

Tested by

no test coverage detected