types

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 3 Imported by: 0

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL