<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>LRU on 111qqz's blog</title><link>https://111qqz.com/en/tags/lru/</link><description>Recent content in LRU on 111qqz's blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© 2015-2026 111qqz</copyright><lastBuildDate>Fri, 18 Aug 2017 19:18:25 +0000</lastBuildDate><atom:link href="https://111qqz.com/en/tags/lru/index.xml" rel="self" type="application/rss+xml"/><item><title>leetcode 146. LRU Cache(list+unordered_map)</title><link>https://111qqz.com/en/post/acm-icpc/2017/2017-08-18-leetcode-146-lru-cachelistunordered_map/</link><pubDate>Fri, 18 Aug 2017 19:18:25 +0000</pubDate><guid>https://111qqz.com/en/post/acm-icpc/2017/2017-08-18-leetcode-146-lru-cachelistunordered_map/</guid><description>&lt;p&gt;请实现最近最少使用缓存(Least Recently Used (LRU) cache)类,需要支持 get,
set,操作。
get 操作,给出 key,获取到相应的 value (value 为非负数),如果不存在返回-1,
如果存在此 key 算作被访问过。
set 操作,设置 key,如果 key 存在则覆盖之前的 value (此时相当于访问过一次)。
如果 key 不存在,需要进行插入操作,如果此时已经 key 的数量已经到达 capacity,
这样需要淘汰掉最近最少使用(也就是上次被使用的时间距离现在最久的)的那
一项。&lt;/p&gt;</description></item><item><title>缓存淘汰算法之LRU（转载）</title><link>https://111qqz.com/en/post/acm-icpc/2017/2017-03-15-e7bc93e5ad98e6b798e6b1b0e7ae97e6b395e4b98blruefbc88e8bdace8bdbdefbc89/</link><pubDate>Wed, 15 Mar 2017 00:34:50 +0000</pubDate><guid>https://111qqz.com/en/post/acm-icpc/2017/2017-03-15-e7bc93e5ad98e6b798e6b1b0e7ae97e6b395e4b98blruefbc88e8bdace8bdbdefbc89/</guid><description>&lt;p&gt;&lt;a href="http://www.cnblogs.com/-OYK/archive/2012/12/05/2803317.html" target="_blank" rel="noreferrer"&gt;参考博客&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;计组块忘光了呜呜呜。。。来复习一波。。&lt;/p&gt;

&lt;h4 class="relative group"&gt;1. LRU
 &lt;div id="1lru" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#1lru" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h4&gt;
&lt;p&gt;1.1. 原理&lt;/p&gt;</description></item></channel></rss>