day2

package
v0.0.0-...-e8b311c Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Part1

func Part1(games []Game) int

Part1 returns the sum of ids of games that are possible if the bag is loaded with 12 red, 13 green, and 14 blue cubes.

func Part2

func Part2(games []Game) int

Part2 finds the power set of each game, which is the product of the minimum number of cubes, and returns the sum.

Types

type Game

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

func LoadGames

func LoadGames(file string) ([]Game, error)

LoadGames loads a list of games from the given input file.

Jump to

Keyboard shortcuts

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