Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UndirectedGraphBFS ¶
func UndirectedGraphBFS[T comparable](g *UndirectedGraph[T], start T) []T
func UndirectedGraphDFS ¶
func UndirectedGraphDFS[T comparable](g *UndirectedGraph[T], start T) []T
Types ¶
type UndirectedGraph ¶
type UndirectedGraph[T comparable] struct { // contains filtered or unexported fields }
UndirectedGraph stored by adjacency list
func NewUndirectedGraph ¶
func NewUndirectedGraph[T comparable](v int) *UndirectedGraph[T]
func (*UndirectedGraph[T]) AddEdge ¶
func (g *UndirectedGraph[T]) AddEdge(s, t T)
Click to show internal directories.
Click to hide internal directories.