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

Function search

javascript/0416-partition-equal-subset-sum.js:137–147  ·  view source on GitHub ↗
(nums, subSetSum, tabu)

Source from the content-addressed store, hash-verified

135};
136
137var search = (nums, subSetSum, tabu) => {
138 for (let numIndex = 1; numIndex <= nums.length; numIndex++) {
139 /* Time O(N) */
140 update(
141 nums,
142 numIndex,
143 subSetSum,
144 tabu,
145 ); /* Time O(N) | Space O(N * M) */
146 }
147};
148
149var update = (nums, numIndex, subSetSum, tabu) => {
150 const num = numIndex - 1;

Callers 1

canPartitionFunction · 0.70

Calls 1

updateFunction · 0.70

Tested by

no test coverage detected