码迷,mamicode.com
首页 >  
搜索关键字:each    ( 14050个结果
POJ1837:Balance(01背包)
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
Climbing Stairs leetcode java
题目: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
Combination Sum II leetcode java
题目: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
[leetcode]Edit distance
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
[leetcode]Text Justification
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
【HackerRank】 The Full Counting Sort
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
#Leet Code# Populating Next Right Pointers in Each Node II
描述:注意需要先self.connect(right)再self.connect(left),否则会有case通不过,原因是左边递归执行时依赖与右边的next已经建立,而先执行connect(left)的话右边还没有完成关系的建立。代码: 1 class Solution: 2 # @par...
分类:其他好文   时间:2014-08-01 19:15:42    阅读次数:223
HDU 4906 Our happy ending
题意: 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
【LeetCode】Partition List
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
LeetCode "Jump Game II"
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!