前言
学习 Go 语言的 container 部分
- list
- ring
- heap
前言
学习Go语言的一些笔记全都放在 腾讯文档中了,诚挚邀请大家一起完善补充,帮忙修改也可以!!
扫码见Golang笔记

Container/list
要点: 双链表结构、“延迟初始化”机制可以保证开箱即用。
type Element struct {
next, prev *Element
// The list to which this element belongs.
list *List
// The value stored with this element.
Value any
}
type List struct {
root Element // sentinel list element, only &root, root.prev, and root.next are used
len int

最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



