day12

package
v0.0.0-...-552ec1b Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func A

func A(input *advent.Input) (int, error)

func B

func B(input *advent.Input) (int, error)

func PartAIsValid

func PartAIsValid(path Path, vertex Vertex) bool

func PartBIsValid

func PartBIsValid(path Path, vertex Vertex) bool

Types

type CaveGraph

type CaveGraph struct {
	V mapset.Set
	E mapset.Set
}

func (*CaveGraph) GetAdjacent

func (cg *CaveGraph) GetAdjacent(v Vertex) []Vertex

func (*CaveGraph) Walk

func (cg *CaveGraph) Walk(paths []Path, isValid func(Path, Vertex) bool) []Path

type Edge

type Edge struct {
	X Vertex
	Y Vertex
}

type Path

type Path []Vertex

func (*Path) Contains

func (p *Path) Contains(v Vertex) bool

func (*Path) IsComplete

func (p *Path) IsComplete() bool

type Vertex

type Vertex string

Jump to

Keyboard shortcuts

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