码迷,mamicode.com
首页 >  
搜索关键字:each    ( 14050个结果
Triangle
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol...
分类:其他好文   时间:2014-07-09 23:00:38    阅读次数:208
LeetCode——Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Fin...
分类:其他好文   时间:2014-07-08 14:21:56    阅读次数:190
Leetcode Edit Distance
Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You have the fol...
分类:其他好文   时间:2014-07-06 19:31:04    阅读次数:181
【leetcode刷提笔记】Container With Most Water
Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of ...
分类:其他好文   时间:2014-07-06 17:44:30    阅读次数:181
Text Justification
Given an array of words and a lengthL, format the text such that each line has exactlyLcharacters and is fully (left and right) justified.You should p...
分类:其他好文   时间:2014-07-06 16:10:10    阅读次数:138
【题解】【数组】【Prime and composite numbers】【Codility】Peaks
Divide an array into the maximum number of same((-))sized blocks, each of which should contain an index P such that A[P - 1] A[P + 1].
分类:其他好文   时间:2014-07-06 15:30:31    阅读次数:465
CTCI 1.2
Since I mainly use Java, this problem seems meaning less for me to implement it with Java. Just use StringBuilder to append each character in string f...
分类:其他好文   时间:2014-07-06 13:33:34    阅读次数:296
leetcode--N-Queens
Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return all distinc...
分类:其他好文   时间:2014-07-06 13:32:49    阅读次数:204
UVa 10152 - ShellSort 题解
按他的方法排序,每次移动一个数到顶点,排成需要的序列。 Problem D: ShellSort He made each turtle stand on another one's back And he piled them all up in a nine-turtle stack. And then Yertle climbed up. He sat down on the p...
分类:其他好文   时间:2014-07-06 09:15:42    阅读次数:211
Climbing Stairs
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? 有f(n) = f(n - 1) + f(n...
分类:其他好文   时间:2014-07-04 08:39:44    阅读次数:304
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!