package
Version:
v0.0.0-...-d7ca37d
Opens a new window with list of versions in this module.
Published: May 27, 2024
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func BinaryBound(first, last int, comp func(middle int) bool) int
BinaryBound std::lower_bound or std::upper_bound
chose (middle, last) when comp return true
chose [first, middle) when comp return false
lower_bound comp example, { return a[middle] < v }
upper_bound comp example, { return a[middle] <= v }
func NextPermutation[T any](
slice []T, first, last int,
less func(a, b T) bool,
) bool
NextPermutation std::next_permutation
func Reverse[T any](slice []T, first, last int)
Reverse std::reverse
type Queue[T any] struct {
}
Queue std::queue
NewQueue create a new Queue
func (que Queue[T]) Back() T
func (que Queue[T]) Front() T
func (que Queue[T]) Pop() T
func (que Queue[T]) Push(v T)
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.