day13

package
v0.0.0-...-5d524ee Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Day13 = runner.NewStreamingDay(13, parsePatterns, part1, part2).
	WithExpectedAnswers(37975, 32497)

Functions

This section is empty.

Types

type Pattern

type Pattern struct {
	Rows []int32 // represents a row of the pattern
	Cols []int32 // represents a column of the pattern
}

func (Pattern) String

func (p Pattern) String() string

func (Pattern) SummarizeReflection

func (p Pattern) SummarizeReflection(expectedBitFlips int) (int, error)

SummarizeReflection returns the number of columns or rows before the reflection in the pattern. If there is no reflection, then -1 is returned.

If the reflection is a horizontal reflection, then the number of rows before the reflection is multiplied by 100

Jump to

Keyboard shortcuts

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