一.链表的实现
1.1 代码
package Algorithm
import (
_ container/list
errors
fmt
)
type Node struct {
data interface{}
pre *Node
next *Node
}
type List struct {
head *Node
tail *Node
length uint64
}
func GetList() *List{
list := &List{
head: nil,
tail:nil,
length:0,
}
return list