原题地址:https://oj.leetcode.com/problems/trapping-rain-water/题意:Givennnon-negative
integers representing an elevation map where the width of each bar is ...
分类:
移动开发 时间:
2014-06-12 23:35:22
阅读次数:
409
原题地址:https://oj.leetcode.com/problems/text-justification/题意:Given
an array of words and a lengthL, format the text such that each line has
exactlyLcha...
分类:
编程语言 时间:
2014-06-12 15:12:05
阅读次数:
296
原题地址:https://oj.leetcode.com/problems/container-with-most-water/题意:Givennnon-negative
integersa1,a2, ...,an, where each represents a point at coordina...
分类:
编程语言 时间:
2014-06-10 20:05:44
阅读次数:
213
VCF is a text format. It contains
meta-information lines, a header line, and then data lines each containing
information about a posittion in the geno...
分类:
其他好文 时间:
2014-06-10 11:35:34
阅读次数:
771
问题:
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 climb to the top?
分析:
该问题是符合斐波那契数列的,具体...
分类:
其他好文 时间:
2014-06-10 08:19:31
阅读次数:
194
题目
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 climb to the top?
方法
从后往前求解...
分类:
其他好文 时间:
2014-06-10 07:38:21
阅读次数:
171
Graph coloring is the problem of assigning a color to each vertex of an undirected graph such that no two adjacent vertices have the same color. We implement the greedy algorithm from Scalable parallel graph coloring algorithms. The algorithm iteratively f...
分类:
其他好文 时间:
2014-06-10 07:10:19
阅读次数:
260
$each 配合 $addToSet :
只将不存于数组 field 中的多值加入到field中,去重
db.COLLECTION.update(
,
{
$addToSet: {
: {
$each: [ , ... ]
}
}
}
)
$each 配合 $push:
将多值压入数组 field 中,不去重
db.COLLE...
分类:
数据库 时间:
2014-06-10 06:32:12
阅读次数:
555
Two players, S and T, are playing a game where they make alternate moves. S plays
first.
In this game, they start with an integer N. In each move, a player removes one digit from the integer and p...
分类:
其他好文 时间:
2014-06-10 06:31:29
阅读次数:
302