exercises

package
v0.0.0-...-e61498d Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: Unlicense Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash

func Hash(s string, useWildJ bool) int

Hash returns a numeric representation of a dedup reduction of cards.

Example: "23456" -> 00005 "12344" -> 00013 "33333" -> 10000

func ToHex

func ToHex(cards string, useWildJ bool) int

Types

type Card

type Card int

type Cards

type Cards []Card

type Exercise

type Exercise struct {
	common.BaseExercise
}

Exercise for Advent of Code 2023 day 7.

func (Exercise) One

func (e Exercise) One(instr string) (any, error)

One returns the answer to the first part of the exercise.

func (Exercise) Two

func (e Exercise) Two(instr string) (any, error)

Two returns the answer to the second part of the exercise. not: 246948152

type Hand

type Hand struct {
	Cards    string
	Value    int
	Strength int
	Bid      int
}

Jump to

Keyboard shortcuts

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