tsort

package
v1.0.54 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSorted added in v1.0.1

func IsSorted[T ttypes.Ordered](data []T, reverseOpts ...bool) bool

func SortComparator

func SortComparator[T ttypes.IComparator](data T)

SortComparator 对实现了比较接口的类型排序

func SortSlice

func SortSlice[T ttypes.Ordered](data []T, reverseOpts ...bool)

SortSlice 对切片排序, 切片必须是可以比较的类型

func SortSliceWithComparator

func SortSliceWithComparator[T any](data []T, comparator func(i, j int) bool)

SortSliceWithComparator 针对切片的自定义排序

Types

This section is empty.

Jump to

Keyboard shortcuts

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