Description
Gigel has a strange "balance" and he wants to poise it. Actually, the device is different from any other ordinary balance.
It orders two arms of negligible weight and each arm's lengt...
分类:
其他好文 时间:
2014-08-02 15:30:13
阅读次数:
235
题目:You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you....
分类:
编程语言 时间:
2014-08-02 12:19:43
阅读次数:
389
题目:Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each ....
分类:
编程语言 时间:
2014-08-02 01:48:12
阅读次数:
246
Edit DistanceGiven two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You...
分类:
其他好文 时间:
2014-08-02 01:29:22
阅读次数:
309
Text JustificationGiven an array of words and a lengthL, format the text such that each line has exactlyLcharacters and is fully (left and right) just...
分类:
其他好文 时间:
2014-08-01 22:42:02
阅读次数:
324
In this challenge you need to print the data that accompanies each integer in a list. In addition, if two strings have the same integers, you need to ...
分类:
其他好文 时间:
2014-08-01 22:40:42
阅读次数:
323
描述:注意需要先self.connect(right)再self.connect(left),否则会有case通不过,原因是左边递归执行时依赖与右边的next已经建立,而先执行connect(left)的话右边还没有完成关系的建立。代码: 1 class Solution: 2 # @par...
分类:
其他好文 时间:
2014-08-01 19:15:42
阅读次数:
223
题意: Given a sequence a_1,a_2,...,a_n, if we can take some of them(each a_i can only be used once), and they sum to k, then we say this sequence is a ....
分类:
移动开发 时间:
2014-08-01 18:43:02
阅读次数:
350
Given a linked list and a value x, partition it such that all nodes less than
x come before nodes greater than or equal to x.
You should preserve the original relative order of the nodes in each of ...
分类:
其他好文 时间:
2014-08-01 13:45:32
阅读次数:
163
Greedy, Greedy, Greedy.. It is all about maximum interval update.One trick is, we start looping over each element from the one nearest to end to farth...
分类:
其他好文 时间:
2014-08-01 13:32:21
阅读次数:
283