0146_lru-cache

command
v0.0.0-...-60194e6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2020 License: Unlicense Imports: 0 Imported by: 0

README

0146_lru-cache

Least Recently Used (LRU) cache.

要求使用O(1)的时间完成存取操作.

单纯的存取用map完成. 此处我们需要维护一个双向链表.

map存着链表的node, 双向链表使得链表摘取单个node到尾部操作变为O(1).

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL