Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu...
分类:
其他好文 时间:
2014-07-11 20:36:27
阅读次数:
234
Implement wildcard pattern matching with support for '?' and '*'.
'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).
The matching should cover t...
分类:
其他好文 时间:
2014-07-10 21:21:42
阅读次数:
255
How would you design a stack which, in addition to push and pop, also has a function min which returns the minimum element? Push, pop and min should a...
分类:
其他好文 时间:
2014-07-10 16:45:33
阅读次数:
210
Given an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the following matri...
分类:
其他好文 时间:
2014-07-08 23:54:39
阅读次数:
407
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.
分类:
其他好文 时间:
2014-07-08 22:54:28
阅读次数:
287
If you are not satisfied with default Google map Marker (Default google marker can only be a icon, image or shape),
for example adding a border, then you should use richmarker!
http://google-maps...
分类:
其他好文 时间:
2014-07-08 17:17:18
阅读次数:
386
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input st...
分类:
其他好文 时间:
2014-07-08 16:57:40
阅读次数:
193
题目
Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only constant spac...
分类:
其他好文 时间:
2014-07-08 13:46:26
阅读次数:
205
UITextView in iOS7 has been really weird. As you type and are entering the last line of your UITextView, the scroll view doesn't scroll to the bottom like it should and it causes the text to be "clipp...
分类:
移动开发 时间:
2014-07-08 11:14:15
阅读次数:
225
There are two sorted arrays A and B of size m and n respectively.
Find the median of the two sorted arrays.
The overall run time complexity should be O(log (m+n)).
有两个已排序的数组A和B,大小为m 和 n。
找出两数组的中...
分类:
其他好文 时间:
2014-07-05 22:54:17
阅读次数:
244