d2

Imports

Imports #

"advent2024/pkg/solver"
"bufio"
"fmt"
"io"
"log"
"strconv"
"strings"
"advent2024/pkg/solver"
"context"
"fmt"
"io"
"strconv"

Constants & Variables

day var #

var day = "d2"

Structs

PuzzleStruct struct #

type PuzzleStruct struct {
reports *[][]int
}

PuzzleStructWithCtx struct #

type PuzzleStructWithCtx struct {
PuzzleStruct
}

Functions

Init method #

func (p *PuzzleStruct) Init(reader io.Reader) error

InitCtx method #

func (p *PuzzleStructWithCtx) InitCtx(ctx context.Context, reader io.Reader) error

NewSolver function #

func NewSolver() *PuzzleStruct

NewSolverWithCtx function #

func NewSolverWithCtx() *PuzzleStructWithCtx

Solve method #

func (p *PuzzleStruct) Solve(part int) (string, error)

SolveCtx method #

func (p *PuzzleStructWithCtx) SolveCtx(ctx context.Context, part int) (string, error)

init function #

func init()

init function #

func init()

parseInput function #

func parseInput(sc *bufio.Scanner) (*[][]int, error)

report_safe function #

func report_safe(report *[]int) bool

validateInput function #

func validateInput(reports *[][]int) error