template

package
v0.0.0-...-2c2ca37 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SegmentCountTree

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

SegmentCountTree define

func (*SegmentCountTree) Init

func (st *SegmentCountTree) Init(nums []int, oper func(i, j int) int)

Init define

func (*SegmentCountTree) Query

func (st *SegmentCountTree) Query(left, right int) int

Query define

func (*SegmentCountTree) UpdateCount

func (st *SegmentCountTree) UpdateCount(val int)

UpdateCount define

type SegmentTree

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

SegmentTree define

func (*SegmentTree) Init

func (st *SegmentTree) Init(nums []int, oper func(i, j int) int)

Init define

func (*SegmentTree) Query

func (st *SegmentTree) Query(left, right int) int

Query define

func (*SegmentTree) QueryLazy

func (st *SegmentTree) QueryLazy(left, right int) int

QueryLazy define

func (*SegmentTree) Update

func (st *SegmentTree) Update(index, val int)

Update define

func (*SegmentTree) UpdateLazy

func (st *SegmentTree) UpdateLazy(updateLeft, updateRight, val int)

UpdateLazy define

type UnionFind

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

UnionFind defind 路径压缩 + 秩优化

func (*UnionFind) Find

func (uf *UnionFind) Find(p int) int

Find define

func (*UnionFind) Init

func (uf *UnionFind) Init(n int)

Init define

func (*UnionFind) TotalCount

func (uf *UnionFind) TotalCount() int

TotalCount define

func (*UnionFind) Union

func (uf *UnionFind) Union(p, q int)

Union define

type UnionFindCount

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

UnionFindCount define 计算每个集合中元素的个数 + 最大集合元素个数

func (*UnionFindCount) Count

func (uf *UnionFindCount) Count() []int

Count define

func (*UnionFindCount) Find

func (uf *UnionFindCount) Find(p int) int

Find define

func (*UnionFindCount) Init

func (uf *UnionFindCount) Init(n int)

Init define

func (*UnionFindCount) MaxUnionCount

func (uf *UnionFindCount) MaxUnionCount() int

MaxUnionCount define

func (*UnionFindCount) Union

func (uf *UnionFindCount) Union(p, q int)

Union define

Jump to

Keyboard shortcuts

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