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

Function backTrack

javascript/0131-palindrome-partitioning.js:24–28  ·  view source on GitHub ↗
(s, left, right, _partition, partitions)

Source from the content-addressed store, hash-verified

22}
23
24const backTrack = (s, left, right, _partition, partitions) => {
25 _partition.push(s.slice(left, right + 1));
26 partition(s, right + 1, _partition, partitions);
27 _partition.pop();
28};
29
30const isPalindrome = (str, left, right) => {
31 while (left < right) {

Callers 1

partitionFunction · 0.70

Calls 3

partitionFunction · 0.70
pushMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected