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

Function bfs

javascript/0207-course-schedule.js:185–191  ·  view source on GitHub ↗
(graph, indegree, queue, order)

Source from the content-addressed store, hash-verified

183};
184
185var bfs = (graph, indegree, queue, order) => {
186 while (!queue.isEmpty()) {
187 for (let i = queue.size() - 1; 0 <= i; i--) {
188 checkNeighbors(graph, indegree, queue, order);
189 }
190 }
191};
192
193var checkNeighbors = (graph, indegree, queue, order) => {
194 const node = queue.dequeue();

Callers 1

topologicalSortFunction · 0.70

Calls 3

checkNeighborsFunction · 0.70
isEmptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected