marcelklehr / toposort

Topologically sort directed acyclic graphs (such as dependency lists) in javascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong sort example?

wclr opened this issue · comments

commented
var ediges = [ [ 'a' ],
  [ 'c', 'b' ],
  [ 'c' ],
  [ 'd' ],
  [ 'c', 'd', 'g', 'a', 'e' ],
  [ 'a', 'b', 'f' ],
  [ 'd', 'g' ] ]

result is : [ 'a', 'c', 'b', 'd', undefined, 'g' ]

expect something like [ 'c', 'd', 'g', 'a', 'b', 'e', 'f' ]

commented

ah probably i din't get the API