Skip to content

Regarding the depth traversal issue of v1.0.1 version #6

@JY-Sun-K

Description

@JY-Sun-K

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions