Documentation ¶
Index ¶
Constants ¶
View Source
const ( // MoveToFront define MoveToFront command = iota // PushFront define PushFront // Delete define Delete )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryIndexedTree ¶
type BinaryIndexedTree struct {
// contains filtered or unexported fields
}
BinaryIndexedTree define
func (*BinaryIndexedTree) InitWithNums ¶
func (bit *BinaryIndexedTree) InitWithNums(nums []int)
InitWithNums define
type BinaryIndexedTree2D ¶
type BinaryIndexedTree2D struct {
// contains filtered or unexported fields
}
BinaryIndexedTree2D define
func (*BinaryIndexedTree2D) Add ¶
func (bit2 *BinaryIndexedTree2D) Add(i, j int, val int)
Add define
func (*BinaryIndexedTree2D) Query ¶
func (bit2 *BinaryIndexedTree2D) Query(i, j int) int
Query define
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) QueryLazy ¶
func (st *SegmentTree) QueryLazy(left, right int) int
QueryLazy 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 路径压缩 + 秩优化
type UnionFindCount ¶
type UnionFindCount struct {
// contains filtered or unexported fields
}
UnionFindCount define 计算每个集合中元素的个数 + 最大集合元素个数
func (*UnionFindCount) MaxUnionCount ¶
func (uf *UnionFindCount) MaxUnionCount() int
MaxUnionCount define
Click to show internal directories.
Click to hide internal directories.