day14

package
v0.0.0-...-acf6961 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseInput

func ParseInput(in [][]string) (*Polymer, Rules, error)

func Part1

func Part1(p *Polymer, r Rules) (int, error)

func Part2

func Part2(p *Polymer, r Rules) (int, error)

Types

type Pair

type Pair [2]rune

type Polymer

type Polymer struct {
	// contains filtered or unexported fields
}

func NewPolymer

func NewPolymer(template string) (*Polymer, error)

func (*Polymer) Clone

func (p *Polymer) Clone() *Polymer

func (*Polymer) Score

func (p *Polymer) Score() int

func (*Polymer) Step

func (p *Polymer) Step(r Rules) error

func (*Polymer) StepN

func (p *Polymer) StepN(r Rules, n int) error

type Rules

type Rules map[Pair]rune

Jump to

Keyboard shortcuts

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