day7

package
v0.0.0-...-38c8f7e Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseRules

func ParseRules(in []string) (Contains, ContainedBy, error)

func Part1

func Part1(containedBy ContainedBy, target Colour) int

func Part2

func Part2(contains Contains, target Colour) int

Types

type BagCount

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

type Colour

type Colour string

type ColourSet

type ColourSet map[Colour]struct{}

func (ColourSet) Slice

func (cs ColourSet) Slice() []Colour

type ContainedBy

type ContainedBy map[Colour]ColourSet

type Contains

type Contains map[Colour][]BagCount

Jump to

Keyboard shortcuts

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