摘要: func QuickSort(arr []int){ type H func([]int,int,int) var h H h= func(arr []int,left int,right int) { l:=left r:=right if l<r{ temp:=arr[left] for l!= 阅读全文
posted @ 2020-03-13 14:12 自娱 阅读(289) 评论(0) 推荐(0)
摘要: package mainimport ( "fmt")//小孩type boy struct { id uint next *boy}//游戏type game struct { head *boy}//用于初始化game结构体func NewGame(num uint)*game{ game:=n 阅读全文
posted @ 2020-03-11 13:43 自娱 阅读(156) 评论(0) 推荐(0)
摘要: 代码如下: package mainimport ( "fmt")//节点type CatNode struct{ id int name string next *CatNode}//循环链表type CircleLink struct{ head *CatNode}//插入func (circl 阅读全文
posted @ 2020-03-10 19:29 自娱 阅读(786) 评论(0) 推荐(0)