sort

package
v0.0.0-...-faecb63 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsertionSort

func InsertionSort[T cmp.Ordered](arr []T) []T

func RandomInputCompare

func RandomInputCompare(st []SortType, al int)

func SelectionSort

func SelectionSort[T cmp.Ordered](arr []T) []T

func Sorted2InputCompare

func Sorted2InputCompare(st []SortType, al int)

func SortedInputCompare

func SortedInputCompare(st []SortType, al int)

Types

type SortType

type SortType int
const (
	Selection SortType = iota // 选择排序
	Insertion                 // 插入排序
)

Jump to

Keyboard shortcuts

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