y2024d05

package
v0.0.0-...-54dfd1d Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Part1

func Part1(inputPath string) int

func Part2

func Part2(inputPath string) int

func Solve

func Solve(inputPath string)

Types

type Rule

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

func (*Rule) IsSatisfied

func (r *Rule) IsSatisfied(pageNums []int) bool

type RuleBook

type RuleBook struct {
	Index map[int][]Rule
}

func NewRuleBook

func NewRuleBook() *RuleBook

func (*RuleBook) AddRule

func (ruleBook *RuleBook) AddRule(rule Rule)

func (*RuleBook) IsValidOrder

func (ruleBook *RuleBook) IsValidOrder(pageNums []int) bool

func (*RuleBook) ReorderPages

func (ruleBook *RuleBook) ReorderPages(pageNums []int) []int

Jump to

Keyboard shortcuts

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