(graph, indegree, order = [])
| 166 | }; |
| 167 | |
| 168 | var topologicalSort = (graph, indegree, order = []) => { |
| 169 | const queue = searchGraph(graph, indegree); |
| 170 | |
| 171 | bfs(graph, indegree, queue, order); |
| 172 | |
| 173 | return order; |
| 174 | }; |
| 175 | |
| 176 | var searchGraph = (graph, indegree, queue = new Queue([])) => { |
| 177 | for (const node in graph) { |
no test coverage detected