LFU 起夜级李姐
Go代码实现
type Node struct {
key, val, freq int
pre, next *Node
}
type DoubleLink struct {
head, tail *Node
length int
}
type LFUCache struct {
freq_map map[int]*DoubleLink
key_map map[int]*Node
cap int
}
func Constructor(capaci
原创
2020-09-23 11:18:58 ·
172 阅读 ·
0 评论