Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Int64StableSort ¶
func Int64StableSort(s []int64)
Int64StableSort 对[]int64稳定排序 从小到大,当元素相同时候,保持原有index顺序
func Slice ¶
Slice 对s切片类型的数据进行排序,当出现相同元素的话,采用快速排序 The sort is not guaranteed to be stable. For a stable sort, use SliceStable.
func SliceStable ¶
============对[]Type类型的切片进行排序========================= SliceStable 对切片类型的s进行稳定排序 SliceStable sorts the provided slice given the provided less function while keeping the original order of equal elements. The function panics if the provided interface is not a slice.
Types ¶
type Int64Slice ¶
type Int64Slice []int64
int64类型的切片排序
func NewInt64Slice ¶
func NewInt64Slice(s []int64) Int64Slice
func (Int64Slice) Len ¶
func (s Int64Slice) Len() int
func (Int64Slice) Less ¶
func (s Int64Slice) Less(i, j int) bool
func (Int64Slice) Swap ¶
func (s Int64Slice) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.