d22

package
v0.0.0-...-3cf76cc Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseInput

func ParseInput(f []byte) (IntQueue, IntQueue, error)

ParseInput ..

func SolvePart1

func SolvePart1(p1, p2 IntQueue) int

SolvePart1 ..

func SolvePart2

func SolvePart2(p1, p2 IntQueue) (int, error)

SolvePart2 ..

Types

type IntQueue

type IntQueue []int

IntQueue ..

func (*IntQueue) MustPop

func (q *IntQueue) MustPop() int

MustPop ..

func (*IntQueue) Pop

func (q *IntQueue) Pop() (int, bool)

Pop ..

func (*IntQueue) Push

func (q *IntQueue) Push(n int)

Push ..

type IntStack

type IntStack []int

IntStack ..

func (*IntStack) MustPop

func (s *IntStack) MustPop() int

MustPop ..

func (*IntStack) Pop

func (s *IntStack) Pop() (int, bool)

Pop ..

func (*IntStack) Push

func (s *IntStack) Push(n int)

Push ..

Jump to

Keyboard shortcuts

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