shuttle

package
v0.0.0-...-07010e4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindEarliestSubsequent

func FindEarliestSubsequent(bs []Bus) (int, error)

func FindEarliestSubsequentIntelli

func FindEarliestSubsequentIntelli(bs []Bus) (int, error)

func PrintSubsequentIntelli

func PrintSubsequentIntelli(bs []Bus, maxCnt int)

Types

type Bus

type Bus struct {
	ID     int
	Offset int
}

func ParseBusses

func ParseBusses(ri RawInput) ([]Bus, error)

type Input

type Input struct {
	EarliestTime int
	Shuttles     []int
}

func ParseInput

func ParseInput(ri RawInput) (Input, error)

func (Input) FindEarliestDeparture

func (in Input) FindEarliestDeparture() (Result, error)

func (Input) String

func (i Input) String() string

type RawInput

type RawInput struct {
	EarliestTime string
	Shuttles     string
}

type Result

type Result struct {
	BusID    int
	DepartAt int
}

Jump to

Keyboard shortcuts

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