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

Function backTrack

javascript/0040-combination-sum-ii.js:41–45  ·  view source on GitHub ↗
(candidates, target, i, combination, combinations)

Source from the content-addressed store, hash-verified

39};
40
41const backTrack = (candidates, target, i, combination, combinations) => {
42 combination.push(candidates[i]);
43 dfs(candidates, target - candidates[i], i + 1, combination, combinations);
44 combination.pop();
45};

Callers 1

dfsFunction · 0.70

Calls 3

dfsFunction · 0.70
pushMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected