Go Package sort: Difference between revisions
Jump to navigation
Jump to search
Line 21: | Line 21: | ||
To sort slices, <code>slices.Sort*</code> is preferred. | To sort slices, <code>slices.Sort*</code> is preferred. | ||
= | =Slice Sorting= | ||
{{Internal|Go Slice Sorting#Overview|Slice Sorting}} | |||
Latest revision as of 03:09, 13 June 2024
External
Internal
Overview
The package provides primitives for sorting slices of ints and floats and user-defined collections.
The sort
package.
sort.Ints(slice)
sort.Float64s(slice)
sort.Strings(slice)
To sort slices, slices.Sort*
is preferred.