day5

package
v0.0.0-...-c2f6671 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BruteForceParseSeeds

func BruteForceParseSeeds(path string) [][]int

func ParseSeeds

func ParseSeeds(path string) []int

func Problem1

func Problem1()

func Problem2

func Problem2()

Types

type Data

type Data struct {
	DestinationStart int
	SourceStart      int
	Range            int
}

func ParseData

func ParseData(path string) []Data

type Input

type Input struct {
	Seeds                 []int
	SeedToSoil            []Data
	SoilToFertilizer      []Data
	FertilizerToWater     []Data
	WaterToLight          []Data
	LightToTemperature    []Data
	TemperatureToHumidity []Data
	HumidityToLocation    []Data
}

func NewInput

func NewInput(folderPath string) *Input

type InputData

type InputData struct {
	// Seeds is a range of seeds with start and end values
	Seeds [][]int
	// Blocks are the blocks of data in the correct order
	Blocks [][][]int
}

func ParseToBlocks

func ParseToBlocks(filePath string) InputData

Jump to

Keyboard shortcuts

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