原题链接:https://oj.leetcode.com/problems/lru-cache/
题目大意:设计操作系统中资源管理算法所使用的一种数据结构,即LRU算法。是一道偏向于综合的题。
方法:一个哈希表+一个双端链表
思路:一方面LRU Cache算法要求可以快速访问结点,所以我们很容易想到使用哈希表或者数组。另一方面,该算法要求在达到容量上限时,删除最久未访问的数据结点。这要求所设...
分类:
系统相关 时间:
2014-11-16 17:24:44
阅读次数:
182
Given any $k$-tupel of linearly independent vectors $X$ as above, there exists a $k$-tuple $Y$ biorthognal to it. If $k=n$, this $Y$ is unique. \eex$$...
分类:
其他好文 时间:
2014-11-16 12:02:08
阅读次数:
151
[Bhatia.Matrix Analysis.Solutions to Exercises and Problems]ExI.1.3Use the QR decomposition to prove Hadamard's inequality: if $X=(x_1,\cdots,x_n)$, t...
分类:
其他好文 时间:
2014-11-16 11:58:53
阅读次数:
153
Use the QR decomposition to prove Hadamard's inequality: if $X=(x_1,\cdots,x_n)$, then $$\bex |\det X|\leq \prod_{j=1}^n \sen{x_j}. \eex$$ Equality ho...
分类:
其他好文 时间:
2014-11-16 11:54:28
阅读次数:
107
Let $X$ be nay basis of $\scrH$ and let $Y$ be the basis biorthogonal to it. Using matrix multiplication, $X$ gives a linear transformation from $\bbC...
分类:
其他好文 时间:
2014-11-16 11:53:20
阅读次数:
169
http://www.nowamagic.net/librarys/veda/detail/636Hackers solve problems and build things, and they believe in freedom and voluntary mutual help. To be...
分类:
其他好文 时间:
2014-11-15 18:27:08
阅读次数:
308
There's usually a common strategy for "find *" problems - binary search: half the space can be dropped by some rules.And take care of corner cases.cla...
分类:
其他好文 时间:
2014-11-15 16:53:56
阅读次数:
171
描述When Teddy was a child , he was always thinking about some simple math problems ,such as “What it’s 1 cup of water plus 1 pile of dough ..” , “100 y...
分类:
其他好文 时间:
2014-11-15 06:32:43
阅读次数:
127
Problem Description After inventing Turing Tree, 3xian always felt boring when solving problems about intervals, because Turing Tree could easily have...
分类:
其他好文 时间:
2014-11-14 06:55:49
阅读次数:
227
Problem Description
After inventing Turing Tree, 3xian always felt boring when solving problems about intervals, because Turing Tree could easily have the solution. As well, wily 3xian made lots of...
分类:
其他好文 时间:
2014-11-14 01:41:02
阅读次数:
169