链表
双向链表的每个节点都是一个 listNode。
type listNode struct {
prev *listNode
next *listNode
value interface{}
}为了操作方便,还提供了一个 list 结构
type list {
head *listNode
tail *listNode
len uint64
}
Last updated