day11

package
v0.0.0-...-9c9a4a3 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map struct {
	Rows     int
	Cols     int
	Galaxies []*Position
}

func Parse

func Parse(s string) *Map

func (*Map) Expand

func (m *Map) Expand(n int) *Map

func (*Map) Print

func (m *Map) Print()

func (*Map) SumDistances

func (m *Map) SumDistances() int

type Position

type Position struct {
	R int
	C int
}

func (*Position) Distance

func (p *Position) Distance(p2 *Position) int

func (*Position) Equals

func (p *Position) Equals(r, c int) bool

Jump to

Keyboard shortcuts

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