internal

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConcatAll

func ConcatAll(slices ...[]int) []int

func NbElements

func NbElements(slices [][]int) int

Types

type MergeIterator added in v0.13.0

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

MergeIterator iterates through a merging of multiple sorted slices

func NewMergeIterator added in v0.13.0

func NewMergeIterator(s [][]int) *MergeIterator

NewMergeIterator assumes that all slices in s are sorted

func (*MergeIterator) IndexIfNext added in v0.13.0

func (i *MergeIterator) IndexIfNext(value int) int

IndexIfNext returns the index of the slice and advances the iterator if the next value is value, otherwise returns -1 If the iterator is empty, IndexIfNext returns -1

func (*MergeIterator) Next added in v0.13.0

func (i *MergeIterator) Next() (value, index int)

Next returns the next smallest value and the index of the slice it came from, and advances the iterator If the iterator is empty, Next returns (math.MaxInt, -1)

func (*MergeIterator) Peek added in v0.13.0

func (i *MergeIterator) Peek() (value, index int)

Peek returns the next smallest value and the index of the slice it came from If the iterator is empty, Peek returns (math.MaxInt, -1)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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