day16

package
v0.0.0-...-064b852 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const Down int = 2
View Source
const Left int = 3
View Source
const Right int = 1
View Source
const Up int = 0

Variables

This section is empty.

Functions

func Level1

func Level1(in io.Reader) string

func Level2

func Level2(in io.Reader) string

Types

type Item

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

Heap implementation from the Go Docs An Item is something we manage in a priority queue.

type PriorityQueue

type PriorityQueue []*Item

A PriorityQueue implements heap.Interface and holds Items.

func (PriorityQueue) Len

func (pq PriorityQueue) Len() int

func (PriorityQueue) Less

func (pq PriorityQueue) Less(i, j int) bool

func (*PriorityQueue) Pop

func (pq *PriorityQueue) Pop() any

func (*PriorityQueue) Push

func (pq *PriorityQueue) Push(x any)

func (PriorityQueue) Swap

func (pq PriorityQueue) Swap(i, j int)

Jump to

Keyboard shortcuts

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