An open API service indexing awesome lists of open source software.

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

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"))
}
```