Documentation
¶
Index ¶
- func CopyArr(arr []int) []int
- func GenerateNearlyOrderedArray(n, swapTimes int) []int
- func GenerateRandomArray(n, min, max int) []int
- func InsertionSort(list []int) []int
- func IsSorted(arr []int) bool
- func MergeSort(list []int) []int
- func MergeSort_2(list []int) []int
- func QuickSort(list []int) []int
- func RandomInt(start, end int, includeEnd bool) int
- func TestSort(sortName string, f func([]int) []int, arr []int)
- func ThreeWayQuickSort(list []int) []int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateRandomArray ¶
func InsertionSort ¶
* InsertionSort: 插入排序 前置的元素已经排好序, 每次从最后一个排好序的元素的下一位开始, 往前比较, 将元素插入相应的位置
func MergeSort_2 ¶
func ThreeWayQuickSort ¶
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.