【题目】
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 the key exists in the cache, otherwise return -1.
se...
分类:
其他好文 时间:
2014-06-29 22:45:26
阅读次数:
358
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.
分类:
其他好文 时间:
2014-06-27 11:43:25
阅读次数:
173
10. View the Exhibit and examine the structure of the PROMOTIONS table.Each promotion has a duration of at least seven days .Your manager has asked yo...
分类:
其他好文 时间:
2014-06-26 15:36:20
阅读次数:
240
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,...
分类:
其他好文 时间:
2014-06-26 15:10:47
阅读次数:
168
【题目】
There are N children standing in a line. Each child is assigned a rating value.
You are giving candies to these children subjected to the following requirements:
Each child must have at least one candy.
Children with a higher rating get more candie...
分类:
其他好文 时间:
2014-06-26 13:37:26
阅读次数:
265
A bottom-up DP. To be honest, it is not easy to relate DP to this problem. Maybe, all "most"\"least" problems can be solved using DP..Reference:http:/...
分类:
Web程序 时间:
2014-06-25 18:39:32
阅读次数:
235
题目:Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the v...
分类:
其他好文 时间:
2014-06-25 14:12:42
阅读次数:
214
题目
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...
分类:
其他好文 时间:
2014-06-24 22:45:43
阅读次数:
202
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 ...
分类:
其他好文 时间:
2014-06-24 17:25:41
阅读次数:
197
Problem 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...
分类:
其他好文 时间:
2014-06-24 15:01:58
阅读次数:
168