【文件属性】:
文件名称:lrucacheleetcode-LRU_Cache_Algorithm:用C++实现LRU缓存算法
文件大小:2KB
文件格式:ZIP
更新时间:2021-06-29 22:31:25
系统开源
lru
cache
leetcode
LRU
Cache
Algorithm
(LRU缓存算法)
C++版本,适用于
##LRU算法介绍
引自:
Discards
the
least
recently
used
items
first.
This
algorithm
requires
keeping
track
of
what
was
used
when,
which
is
expensive
if
one
wants
to
make
sure
the
algorithm
always
discards
the
least
recently
used
item.
General
implementations
of
this
technique
require
keeping
"age
bits"
for
cache-lines
and
track
the
"Least
Recently
Used"
cache-line
based
on
age-bits.
In
such
an
implementation,
every
time
a
cache-line
is
used,
the
【文件预览】:
LRU_Cache_Algorithm-master
----README.md(1KB)
----LRU_Cache.cpp(2KB)