day427

package
v0.0.0-...-36687a4 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const MaxInt = int(^uint(0) >> 1)

MaxInt is the largest int.

Variables

This section is empty.

Functions

func ErrNotPossible

func ErrNotPossible() error

ErrNotPossible is the error returned if a path doesn't exist.

func ShortestRunnerPath

func ShortestRunnerPath(elevations Elevation, paths PathDistance) (int, error)

ShortestRunnerPath with the condition that the route goes entirely uphill at first, and then entirely downhill. Always starts at location 0 and end at location 0.

Types

type Elevation

type Elevation map[int]int

Elevation is a map of locations to their elevations.

type PathDistance

type PathDistance map[int]map[int]int

PathDistance represents the distance for a particular path.

Jump to

Keyboard shortcuts

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