dagger
dagger copied to clipboard
Regarding the depth traversal issue of v1.0.1 version
dag: A->B->C
func (g *Graph) DFS(edgeType string, rootNode Path, fn func(nodePath Node) bool) {
...
stack := driver.NewInMemStack()
...
stack.Range(func(element interface{}) bool {
....
}
stack.Range uses the pop function
output:
C,B,A
But the output of breadth traversal starts from A. So shouldn’t depth traversal also start from A?
Thanks!