Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UndergroundSystem ¶
type UndergroundSystem struct { Stats map[[2]string][2]int // key: [startStation, endStation], value: [timeSpent, trips] Enroute map[int]Entry // key: id, value: {startStation, startTime} }
func Constructor ¶
func Constructor() UndergroundSystem
func (*UndergroundSystem) CheckIn ¶
func (us *UndergroundSystem) CheckIn(id int, stationName string, t int)
func (*UndergroundSystem) CheckOut ¶
func (us *UndergroundSystem) CheckOut(id int, stationName string, t int)
func (*UndergroundSystem) GetAverageTime ¶
func (us *UndergroundSystem) GetAverageTime(startStation string, endStation string) float64
Click to show internal directories.
Click to hide internal directories.