sort

package
v0.0.0-...-c5e7dcc Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BubbleSort

func BubbleSort(list []int)

BubbleSort 冒泡排序(相邻两个元素依次比较大小交换,第一和第二比较,第二和第三比较,依次类推)

func InsertSort

func InsertSort(list []int)

InsertSort 直接插入排序:每一轮取一个元素插入到该元素左边的有序列表形成新的有序列表

func QuickSort

func QuickSort(list []int, start, end int)

func SelectGoodSort

func SelectGoodSort(list []int)

SelectGoodSort 优化后的选择排序,每轮同时找最大值和最小值

func SelectSort

func SelectSort(list []int)

SelectSort 选择排序(遍历数组,每次找到最小值放到前面)

func ShellSort

func ShellSort(list []int)

ShellSort 希尔排序:直接插入排序的改进版,通过多次分组进行插入排序

Types

This section is empty.

Jump to

Keyboard shortcuts

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