Skip to content

lebovski/simple_pathes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple_pathes

simple_pathes is library for get all pathes in graph using DFS

Usage:

  1. set edges
  2. call dfs

Example:

package main

import (
	"fmt"
	"github.com/lebovski/simple_pathes/graph"
)

func main() {
	var ces = graph.Edges{
		{"a", "b"},
		{"b", "f"},
		{"b", "d"},
		{"a", "c"},
		{"c", "d"},
		{"c", "j"},
		{"d", "e"},
		{"e", "f"},
		{"j", "f"},
		{"e", "c"},
	}
	fmt.Printf("\n%v\n\n", ces.DFS("a", "f"))
}

About

Get all paths in graph using by edges

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages