DescriptionSome days ago, I learned the concept of LCM (least common multiple). I've played with it for several times and I want to make a big number ...
分类:
其他好文 时间:
2015-04-17 13:30:32
阅读次数:
132
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:
get and set.
get(key) - Get the value (will always be positive) of the key if t...
分类:
系统相关 时间:
2015-04-14 13:04:48
阅读次数:
185
Maximum Product Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest product.
For example, given the array [2,3,-2,4],
the contiguous s...
分类:
其他好文 时间:
2015-04-13 16:44:36
阅读次数:
129
Write a SQL query to find all numbers that appear at least three times consecutively.
+----+-----+
| Id | Num |
+----+-----+
| 1 | 1 |
| 2 | 1 |
| 3 | 1 |
| 4 | 2 |
| 5 | 1 |
| 6 | 2...
分类:
其他好文 时间:
2015-04-12 16:15:54
阅读次数:
121
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[?2,1,?3,4,?1,2,1,...
分类:
其他好文 时间:
2015-04-11 13:10:37
阅读次数:
84
4975 - Casting Spells
Time limit: 3.000 seconds
Casting spells is the least understood technique of dealing with real life. Actually, people find it quite hard to distinguish between a real spe...
分类:
其他好文 时间:
2015-04-11 00:07:35
阅读次数:
187
实现lru 缓存
LRU Cache
Total Accepted: 35641 Total
Submissions: 241374My Submissions
Question
Solution
Design and implement a data structure for Least Recently Used (LRU) c...
分类:
系统相关 时间:
2015-04-09 17:37:34
阅读次数:
157
题目:Maximum Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.
For example, given the array [?2,1,?3,4,?1,2,1,?5,4],
the contiguo...
分类:
其他好文 时间:
2015-04-09 17:25:35
阅读次数:
171
Problem Description
035 now faced a tough problem,his english teacher gives him a string,which consists with n lower case letter,he must figure out how many substrings appear at least twice,moreover,s...
分类:
编程语言 时间:
2015-04-09 15:34:55
阅读次数:
213
一直对这redis和memcached的两个开源缓存系统的LRU算法感兴趣。今天就打算总结一下这两个LRU算法的实现和区别。
首先要知道什么是LRU算法:LRU是Least Recently Used 近期最少使用算法。相关的资料网上一大堆。http://en.wikipedia.org/wiki/Cache_algorithms#LRU
redis的六种策略
rewrite...
分类:
编程语言 时间:
2015-04-07 00:48:16
阅读次数:
177