https://github.com/lebovski/simple_pathes
Get all paths in graph using by edges
https://github.com/lebovski/simple_pathes
dfs-algorithm golang
Last synced: 8 days ago
JSON representation
Get all paths in graph using by edges
- Host: GitHub
- URL: https://github.com/lebovski/simple_pathes
- Owner: lebovski
- License: mit
- Created: 2018-02-11T11:19:41.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-28T14:30:40.000Z (over 7 years ago)
- Last Synced: 2024-06-20T12:05:08.575Z (over 1 year ago)
- Topics: dfs-algorithm, golang
- Language: Go
- Homepage:
- Size: 28.3 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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"))
}
```