今晚再刷一题,题目如下:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices o...
分类:
其他好文 时间:
2014-08-20 01:20:15
阅读次数:
197
Problem Description
Kingdom Rush is a popular TD game, in which you should build some towers to protect your kingdom from monsters. And now another wave of monsters is coming and you need again to kn...
分类:
其他好文 时间:
2014-08-20 00:08:55
阅读次数:
279
Problem Description
Kingdom Rush is a popular TD game, in which you should build some towers to protect your kingdom from monsters. And now another wave of monsters is coming and you need again to kn...
分类:
其他好文 时间:
2014-08-19 19:02:35
阅读次数:
252
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.For example,Given n = 3, your program should return all ...
分类:
其他好文 时间:
2014-08-18 21:58:52
阅读次数:
260
①原题 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)). ②乡村英语翻译一下 给你两个...
分类:
其他好文 时间:
2014-08-18 16:40:32
阅读次数:
155
Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the origi...
分类:
其他好文 时间:
2014-08-16 16:21:10
阅读次数:
229
The first 3 parts are easy to get. I should know the name, version, and culture for the assembly since I am writing it. The part that can be a little ...
分类:
其他好文 时间:
2014-08-16 12:23:00
阅读次数:
226
Given an integer n, generate a square matrix filled with elements from 1 to n2 in
spiral order.
For example,
Given n = 3,
You should return the following matrix:
[
[ 1, 2, 3 ],
[ 8, 9, 4 ],
[...
分类:
其他好文 时间:
2014-08-15 22:37:39
阅读次数:
274
This problem can be solve in simpler O(NsqrtN) solution, but I will describe O(NlogN) one.
We will solve this problem in offline. For each x (0?≤?x?n) we
should keep all the queries that end in x...
分类:
其他好文 时间:
2014-08-15 21:11:49
阅读次数:
292
You should first runupdate, thenupgrade. Neither of them automatically runs the other.apt-get updateupdates the list of available packages and their v...
分类:
其他好文 时间:
2014-08-15 21:05:19
阅读次数:
229