sort

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSorted

func IsSorted[E any](data []E, less func(a, b E) bool) bool
func Search[E any](data []E, f func(e E) bool) (int, E)

Search given a slice data sorted in ascending order, the call Search[int](data, func(e int) bool { return e >= 23 }) returns the smallest index i and element e such that e >= 23.

func Slice

func Slice[E any](data []E, less func(a, b E) bool)

func StableSlice

func StableSlice[E any](data []E, less func(a, b E) bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

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