arrayOps

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiffArray

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

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/7/15 17:21
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description *

func (*DiffArray) BuildDiffArray

func (m *DiffArray) BuildDiffArray(array []int)

func (*DiffArray) GetAttribute

func (m *DiffArray) GetAttribute() *C.Attribute

func (*DiffArray) GetDiffArray

func (m *DiffArray) GetDiffArray() []int

func (*DiffArray) Increase

func (m *DiffArray) Increase(i, j, val int)

对闭区间 [i,j] 增加 val

type FlightBookings

type FlightBookings struct {
}

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/7/16 00:33
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description *

func (*FlightBookings) GetAttribute

func (m *FlightBookings) GetAttribute() *C.Attribute

func (*FlightBookings) Method

func (m *FlightBookings) Method(bookingRecord [][]int, seatNum int) []int

type GapMulti

type GapMulti struct {
}

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/7/15 17:21
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description 给定一个数组 A[0,1,…,n-1],请构建一个数组 B[0,1,…,n-1],
  • 其中B[i] 的值是数组 A 中除了下标 i 以外的元素的积, 即B[i]=A[0]×A[1]×…×A[i-1]×A[i+1]×…×A[n-1]。不能使用除法 *

func (*GapMulti) GetAttribute

func (m *GapMulti) GetAttribute() *C.Attribute

func (*GapMulti) Method

func (m *GapMulti) Method(array []int) []int

type OverHalfNum

type OverHalfNum struct {
}

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/7/15 14:31
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description
  • 假设要找的数字是num,如果跟下一个array[i]不一致,则count--,即对对消除 *

func (*OverHalfNum) GetAttribute

func (m *OverHalfNum) GetAttribute() *C.Attribute

func (*OverHalfNum) Method

func (m *OverHalfNum) Method(array []int) int

type OverHalfNumByMap

type OverHalfNumByMap struct {
}

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/7/15 14:31
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description *

func (*OverHalfNumByMap) GetAttribute

func (m *OverHalfNumByMap) GetAttribute() *C.Attribute

func (*OverHalfNumByMap) Method

func (m *OverHalfNumByMap) Method(array []int) int

type OverHalfNumBySort

type OverHalfNumBySort struct {
}

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/7/15 14:31
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description *

func (*OverHalfNumBySort) GetAttribute

func (m *OverHalfNumBySort) GetAttribute() *C.Attribute

func (*OverHalfNumBySort) Method

func (m *OverHalfNumBySort) Method(array []int) int

type PreSumArray

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

*

  • @author ljfirst
  • @version V1.0
  • @date 2023/7/15 17:21
  • @author-Email ljfirst@mail.ustc.edu.cn
  • @blogURL https://blog.csdn.net/ljfirst
  • @description *

func (*PreSumArray) BuildPreSum

func (m *PreSumArray) BuildPreSum(array []int)

func (*PreSumArray) GetAttribute

func (m *PreSumArray) GetAttribute() *C.Attribute

func (*PreSumArray) QueryPreSum

func (m *PreSumArray) QueryPreSum(i, j int) int

Jump to

Keyboard shortcuts

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