medium

package
v0.0.0-...-0471bb1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataItem

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

type Heap

type Heap []Item

func (Heap) Len

func (h Heap) Len() int

func (Heap) Less

func (h Heap) Less(i, j int) bool

func (*Heap) Pop

func (h *Heap) Pop() any

func (*Heap) Push

func (h *Heap) Push(x any)

func (Heap) Swap

func (h Heap) Swap(i, j int)

type IntHeap

type IntHeap []int

func (IntHeap) Len

func (h IntHeap) Len() int

func (IntHeap) Less

func (h IntHeap) Less(i, j int) bool

func (*IntHeap) Pop

func (h *IntHeap) Pop() any

func (*IntHeap) Push

func (h *IntHeap) Push(x any)

func (IntHeap) Swap

func (h IntHeap) Swap(i, j int)

type Item

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

type ListNode

type ListNode struct {
	Val  int
	Next *ListNode
}

type RandomizedSet

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

func Constructor

func Constructor() RandomizedSet

func (*RandomizedSet) GetRandom

func (this *RandomizedSet) GetRandom() int

func (*RandomizedSet) Insert

func (this *RandomizedSet) Insert(val int) bool

func (*RandomizedSet) Remove

func (this *RandomizedSet) Remove(val int) bool

type Set

type Set map[string]struct{}

func (Set) Add

func (set Set) Add(key byte)

func (Set) Contains

func (set Set) Contains(key byte) bool

func (*Set) Remove

func (set *Set) Remove(key int)

func (*Set) ToIntSlice

func (set *Set) ToIntSlice() []int

type StationState

type StationState struct {
	Sum   int
	Count int
}

type StockSpanner

type StockSpanner []DataItem

func Constructor

func Constructor() StockSpanner

func (*StockSpanner) Next

func (this *StockSpanner) Next(price int) int

type StringTuple2

type StringTuple2 struct {
	Item1 string
	Item2 string
}

type TreeNode

type TreeNode struct {
	Val   int
	Left  *TreeNode
	Right *TreeNode
}

type UndergroundSystem

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

func Constructor

func Constructor() UndergroundSystem

func (*UndergroundSystem) CheckIn

func (this *UndergroundSystem) CheckIn(id int, stationName string, t int)

func (*UndergroundSystem) CheckOut

func (this *UndergroundSystem) CheckOut(id int, stationName string, t int)

func (*UndergroundSystem) GetAverageTime

func (this *UndergroundSystem) GetAverageTime(startStation string, endStation string) float64

type UserState

type UserState struct {
	Station string
	Time    int
}

type WordHeap

type WordHeap []WordHeapItem

func (WordHeap) Len

func (h WordHeap) Len() int

func (WordHeap) Less

func (h WordHeap) Less(i, j int) bool

func (*WordHeap) Pop

func (h *WordHeap) Pop() interface{}

func (*WordHeap) Push

func (h *WordHeap) Push(x interface{})

func (WordHeap) Swap

func (h WordHeap) Swap(i, j int)

type WordHeapItem

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

Source Files

Jump to

Keyboard shortcuts

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