Пример #1
0
func DirectedSearch(g digraph.Digraph, sources ...int) DFS {
	dfs := &dfs{
		graph:  g,
		marked: make([]bool, g.Vertices()),
	}
	for _, source := range sources {
		dfs.search(source)
	}
	return dfs
}