runtimelib

package
v0.0.0-...-d6b0b83 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2026 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSortedFloat64s

func IsSortedFloat64s(arr []float64) bool

IsSortedFloat64s checks if a slice of float64 values is sorted

func IsSortedInts

func IsSortedInts(arr []int) bool

IsSortedInts checks if a slice of integers is sorted

func IsSortedStrings

func IsSortedStrings(arr []string) bool

IsSorted checks if a slice of strings is sorted

func SearchFloat64s

func SearchFloat64s(arr []float64, target float64) int

SearchFloat64s performs binary search on a sorted float64 slice

func SearchInts

func SearchInts(arr []int, target int) int

SearchInts performs binary search on a sorted int slice

func SearchStrings

func SearchStrings(arr []string, target string) int

SearchStrings performs binary search on a sorted string slice

func SortByLength

func SortByLength(arr []string) []string

SortByLength sorts strings by their length

func SortByLengthDescending

func SortByLengthDescending(arr []string) []string

SortByLengthDescending sorts strings by their length in descending order

func SortCustom

func SortCustom(arr []string, less func(i, j int) bool) []string

SortCustom sorts strings using a custom comparison function

func SortFloat64s

func SortFloat64s(arr []float64) []float64

SortFloat64s sorts a slice of float64 values and returns a new slice

func SortFloat64sDescending

func SortFloat64sDescending(arr []float64) []float64

SortFloat64sDescending sorts a slice of float64 values in descending order

func SortInts

func SortInts(arr []int) []int

SortInts sorts a slice of integers and returns a new slice

func SortIntsCustom

func SortIntsCustom(arr []int, less func(i, j int) bool) []int

SortIntsCustom sorts integers using a custom comparison function

func SortIntsDescending

func SortIntsDescending(arr []int) []int

SortIntsDescending sorts a slice of integers in descending order

func SortStrings

func SortStrings(arr []string) []string

SortStrings sorts a slice of strings and returns a new slice

func SortStringsDescending

func SortStringsDescending(arr []string) []string

SortStringsDescending sorts a slice of strings in descending order

Types

This section is empty.

Jump to

Keyboard shortcuts

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