array

package
v0.0.0-...-f550c6f Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiffArr

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

func NewDiffArr

func NewDiffArr(n int) *DiffArr

func (*DiffArr) Incr

func (d *DiffArr) Incr(start, end, n int)

func (*DiffArr) Result

func (d *DiffArr) Result() []int

type NumArray

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

303. 区域和检索 - 数组不可变

func Constructor

func Constructor(nums []int) NumArray

func (*NumArray) SumRange

func (this *NumArray) SumRange(left int, right int) int

type NumMatrix

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

304. 二维区域和检索 - 矩阵不可变 && 剑指 Offer II 013. 二维子矩阵的和

func ConstructorMatrix

func ConstructorMatrix(matrix [][]int) NumMatrix

func (*NumMatrix) SumRegion

func (this *NumMatrix) SumRegion(row1 int, col1 int, row2 int, col2 int) int

type Solution

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

func NewSolution

func NewSolution(w []int) Solution

528. 按权重随机选择

func (*Solution) PickIndex

func (this *Solution) PickIndex() int

Jump to

Keyboard shortcuts

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