sort

package
v0.0.0-...-41c7706 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeSortFunc

func MergeSortFunc(data []interface{}, ascend bool, greaterThan func(interface{}, interface{}) bool) []interface{}

MergeSortFunc 归并排序,任意类型自定义升降序,需要传入大于判断函数实现。修改原数组,稳定排序。

func MergeSortInt

func MergeSortInt(data []int) []int

MergeSortInt 归并排序,整型数组可用,直接修改原数组,稳定升序。

func MergeSortIntCopy

func MergeSortIntCopy(data []int) []int

MergeSortIntCopy 归并排序,整型数组可用,深拷贝不影响原数组,稳定升序。

func QuickSortFunc

func QuickSortFunc(data []interface{}, ascend bool, greaterThan func(interface{}, interface{}) bool) []interface{}

QuickSortFunc 快速排序,任意类型自定升降序,需要传入大于函数实现,修改至原数组。

func QuickSortInt

func QuickSortInt(data []int) []int

QuickSortInt 快速排序,整型数组升序修改原素组。

func QuickSortIntCopy

func QuickSortIntCopy(data []int) []int

QuickSortIntCopy 快速排序,整型数组升序,深拷贝。

Types

This section is empty.

Jump to

Keyboard shortcuts

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