The following question was found in Sedgewick and Wayne book about algorithms in java:
4.2.19 Topological sort and BFS. Explain why the followin
Counter-example:
A -> B A -> C B -> C
BFS starting at A could find the nodes in order A-B-C or A-C-B, but only one of those is a topological sort.
A
A-B-C
A-C-B