day06

package
v0.0.0-...-cede9f0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrParse = errors.New("error while parsing file")

Functions

func CountWaysToWin

func CountWaysToWin(r Race) int

func DistanceRan

func DistanceRan(holdTime, raceTimeLimit int) int

Types

type Exercise

type Exercise struct{}

func (Exercise) Part1

func (e Exercise) Part1(data string) (int, error)

func (Exercise) Part2

func (e Exercise) Part2(data string) (int, error)

type Race

type Race struct {
	Time     int
	Distance int
}

func NewRace

func NewRace(time, distance int) Race

func Parse

func Parse(data string) ([]Race, error)

func ParsePart2

func ParsePart2(data string) (Race, error)

Jump to

Keyboard shortcuts

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