Skip to content

golang-infrastructure/go-sleep-sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

睡眠排序(Sleep Sort)

注意:此项目只是一个玩笑性质的项目,请勿将其用于生产环境!

一、安装

go get -u github.com/golang-infrastructure/go-sleep-sort

二、示例代码

package main

import (
	"fmt"
	sleep_sort "github.com/golang-infrastructure/go-sleep-sort"
)

func main() {

	slice := []uint{8, 6, 9, 3}
	r := sleep_sort.SortUInt(slice)
	fmt.Println(r)
	// Output:
	// [3 6 8 9]

	slice = []uint{1000003, 1000010, 1000000}
	r = sleep_sort.SortUInt(slice)
	fmt.Println(r)
	// Output:
	// [1000000 1000003 1000010]

}

Releases

No releases published

Packages

No packages published

Languages