Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:
其他好文 时间:
2014-07-07 08:19:36
阅读次数:
151
Find a maximum sum of a compact subsequence of array elements and any double slice.
分类:
其他好文 时间:
2014-07-06 20:44:45
阅读次数:
351
Given a log of stock prices compute the maximum possible earning.
分类:
其他好文 时间:
2014-07-06 20:04:21
阅读次数:
259
Max Points on a LineGivennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.点和方向确定一条直线。需要两重循环,第一重循环遍历起始点a,第二重...
分类:
其他好文 时间:
2014-07-06 18:21:01
阅读次数:
175
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
Update: July 4, 2014 Chap 5: At the beginning, he mentioned that: recursion is a divide-and-conquer method. Although many algorithms can be solved in ...
分类:
其他好文 时间:
2014-07-06 15:24:36
阅读次数:
213
Find the maximum number of flags that can be set on mountain peaks.
分类:
其他好文 时间:
2014-07-06 15:07:09
阅读次数:
371
Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:
其他好文 时间:
2014-07-05 20:43:45
阅读次数:
246
定义英文定义:Recursion is the process of repeating items in a self-similar way.具体到计算机中去:递归:又称为递回,在数学和计算机科学中,是指在函数的定义中使用函数自身的方法.[以上定义来源为wiki].英文的Recursion表达的...
分类:
其他好文 时间:
2014-07-05 19:17:57
阅读次数:
200
Given a binary tree, find its maximum depth.
分类:
其他好文 时间:
2014-07-03 13:19:33
阅读次数:
251