package
Version:
v0.0.0-...-cde68c2
Opens a new window with list of versions in this module.
Published: Feb 20, 2021
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func CopyArray(arr []int) []int
复制数组 方便比较不同算法
func GenerateAlmostSortedArray(length, swapTimes int) []int
生成一个数组 这个数组的大部分区间都是有序的
func GenerateRandomArray(length, rangeL, rangeR int) []int
生成一个随机数组
func IsOrig(beforeArr, afterArr []int) bool
IsOrig 验证是否是原来的数组排序的 验证数据变化了没有
IsSorted 验证排序算法的正确性 从小到大排序
func SortTest(sort func(arr []int), arr []int)
排序算法 测试助手 帮助生成随机数组、判断排序正确性、计时
Source Files
¶
Click to show internal directories.
Click to hide internal directories.