day3

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Directions = [][]int{
	{-1, -1}, {-1, 0}, {-1, 1},
	{0, -1}, {0, 1},
	{1, -1}, {1, 0}, {1, 1},
}
View Source
var Directions2 = [][]int{
	{-1, -1}, {-1, 0}, {-1, 1},
	{0, -1}, {0, 1},
	{1, -1}, {1, 0}, {1, 1},
}

Duplicate for readability

Functions

func IsPartNumber

func IsPartNumber(schematic [][]rune, row, col int) bool

func ParseSchematic

func ParseSchematic(filePath string) ([][]rune, error)

func Problem1

func Problem1()

func Problem2

func Problem2()

func Traverse

func Traverse(schematic [][]rune) int

func Traverse2

func Traverse2(schematic [][]rune) map[Coordinate][]int

Types

type Coordinate

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

func IsPartOfGearRatio

func IsPartOfGearRatio(schematic [][]rune, row, col int, gears map[Coordinate][]int) Coordinate

Jump to

Keyboard shortcuts

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