【题目】
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
ADNSserver,ornameserver,isusedtoresolveanIPaddresstoahostnameorviceversa.YoucansetupfourdifferenttypesofDNSservers:AmasterDNSserverforyourdomain(s),whichstoresauthoritativerecordsforyourdomain.AslaveDNSserver,whichreliesonamasterDNSserverfordata.Acaching-on..
分类:
系统相关 时间:
2014-06-10 22:29:28
阅读次数:
432
按照官方文档的说明,安装scrapy 需要以下程序或者库:Python2.7lxml. Most
Linux distributions ships prepackaged versions of lxml. Otherwise refer
tohttp://lxml.de/installation...
分类:
其他好文 时间:
2014-05-25 03:34:05
阅读次数:
314
【题目】
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).
You are given a target value to search. If found in the array return its index, otherwise return -1.
You may assume no du...
分类:
其他好文 时间:
2014-05-22 10:43:12
阅读次数:
310
HDU 3910 Liang Guo Sha
题目大意:
If both of them choose “Sha”, then Alice gets A points, and Bob loses A points; if both of them choose “Shan”, then Alice gets B points, and Bob loses B points; otherwise, Bob gets C points, and Alice loses C points.
给定A B ...
分类:
其他好文 时间:
2014-05-22 06:22:40
阅读次数:
281
Subtraction Game 1
Chef is playing a game on a sequence of N positive integers, say A1, A2, ... AN. The game is played as follows.
If all the numbers are equal, the game ends.Otherwise
Sele...
分类:
其他好文 时间:
2014-05-07 03:14:01
阅读次数:
280