Documentation
¶
Index ¶
- func IsSortedFloat64s(arr []float64) bool
- func IsSortedInts(arr []int) bool
- func IsSortedStrings(arr []string) bool
- func SearchFloat64s(arr []float64, target float64) int
- func SearchInts(arr []int, target int) int
- func SearchStrings(arr []string, target string) int
- func SortByLength(arr []string) []string
- func SortByLengthDescending(arr []string) []string
- func SortCustom(arr []string, less func(i, j int) bool) []string
- func SortFloat64s(arr []float64) []float64
- func SortFloat64sDescending(arr []float64) []float64
- func SortInts(arr []int) []int
- func SortIntsCustom(arr []int, less func(i, j int) bool) []int
- func SortIntsDescending(arr []int) []int
- func SortStrings(arr []string) []string
- func SortStringsDescending(arr []string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSortedFloat64s ¶
IsSortedFloat64s checks if a slice of float64 values is sorted
func IsSortedInts ¶
IsSortedInts checks if a slice of integers is sorted
func IsSortedStrings ¶
IsSorted checks if a slice of strings is sorted
func SearchFloat64s ¶
SearchFloat64s performs binary search on a sorted float64 slice
func SearchInts ¶
SearchInts performs binary search on a sorted int slice
func SearchStrings ¶
SearchStrings performs binary search on a sorted string slice
func SortByLength ¶
SortByLength sorts strings by their length
func SortByLengthDescending ¶
SortByLengthDescending sorts strings by their length in descending order
func SortCustom ¶
SortCustom sorts strings using a custom comparison function
func SortFloat64s ¶
SortFloat64s sorts a slice of float64 values and returns a new slice
func SortFloat64sDescending ¶
SortFloat64sDescending sorts a slice of float64 values in descending order
func SortIntsCustom ¶
SortIntsCustom sorts integers using a custom comparison function
func SortIntsDescending ¶
SortIntsDescending sorts a slice of integers in descending order
func SortStrings ¶
SortStrings sorts a slice of strings and returns a new slice
func SortStringsDescending ¶
SortStringsDescending sorts a slice of strings in descending order
Types ¶
This section is empty.