scozv / algo-js

[obsoleted] has been moved to project Tango:
https://github.com/scozv/tango
GNU General Public License v3.0
2 stars 1 forks source link

topological sort failed at an instance #20

Closed scozv closed 10 years ago

scozv commented 10 years ago

From Algo.js of Google Code on November 22, 2013 21:22:13

What steps will reproduce the problem?

  1. take the graph 1->2->4, 1->3->4, 3->2
  2. run Graph.topologicalSort(g)

What is the expected output? What do you see instead? the expected order is 1->3->2->4, BUT we get 1->2->3->4

Issue occurs at comment // v has been add into frontier

Original issue: http://code.google.com/p/algo-js/issues/detail?id=20

scozv commented 10 years ago

fixed in revision 2ad8c2f

However, the label of vertex in different stage should distinguish each other, and be simplified.

reopen #8