-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
What wrong with my code? I have an exception "The graph is not a DAG".
var topsort = require('../src/graphs/others/topological-sort').topologicalSort;
var graph = [[0, 1, 0, 0, 1],
[0, 0, 0, 0, 0],
[1, 1, 0, 1, 1],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0]];
var vertices = topsort(graph);
But there is a graph I want to represent:
and it looks directed and acyclic.
Metadata
Metadata
Assignees
Labels
No labels