MCPcopy Index your code
hub / github.com/neetcode-gh/leetcode / backTrack

Function backTrack

javascript/0207-course-schedule.js:51–57  ·  view source on GitHub ↗
(currCourse, graph, path)

Source from the content-addressed store, hash-verified

49};
50
51var backTrack = (currCourse, graph, path) => {
52 path[currCourse] = true;
53 const _hasCycle = hasCycle(currCourse, graph, path);
54 path[currCourse] = false;
55
56 return _hasCycle;
57};
58
59var hasCycle = (currCourse, graph, path) => {
60 for (const neighbor of graph[currCourse]) {

Callers 1

isCyclicFunction · 0.70

Calls 1

hasCycleFunction · 0.70

Tested by

no test coverage detected