day03_2018

package
v0.0.0-...-359cf57 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClaimHasOverlaps

func ClaimHasOverlaps(board *FabricBoard, claim FabricClaim) bool

Types

type FabricBoard

type FabricBoard [1000][1000]int

func GetBoardWithClaims

func GetBoardWithClaims(claims []FabricClaim) *FabricBoard
X (width)
------------------->
|

Y (Length) |

|
|
|
|
V

type FabricClaim

type FabricClaim struct {
	ID      int
	StartAt Point
	Width   int
	Length  int
}

type Point

type Point struct {
	X int
	Y int
}

type Solver

type Solver struct {
	Claims []FabricClaim
}

func NewSolver

func NewSolver() *Solver

func (*Solver) Part1

func (s *Solver) Part1() (string, error)

func (*Solver) Part2

func (s *Solver) Part2() (string, error)

func (*Solver) ProcessInput

func (s *Solver) ProcessInput(input string) error

Jump to

Keyboard shortcuts

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