Discover Packages
github.com/lantw44/gotemplate
sort
package
Version:
v0.0.0-...-14f0083
Opens a new window with list of versions in this module.
Published: Jan 5, 2021
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package sort provides primitives for sorting slices of A.
func IsSorted(data []A ) bool
IsSorted reports whether data is sorted.
Less is a function to compare two As
Sort sorts data.
It makes one call to data.Len to determine n, and O(n*log(n)) calls to
data.Less and data.swap. The sort is not guaranteed to be stable.
An A is the element in the slice []A we are sorting
template type Sort(A, Less)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.