s**x 发帖数: 7506 | 1 Given an array A of integers, find the maximum of j-i subjected to the
constraint of A[i] < A[j].
以前讨论过,忘了 mark 了,ihas1337code 上好像还没整理完。
多谢 |
r*******y 发帖数: 1081 | 2 max sum of the subarray
【在 s**x 的大作中提到】 : Given an array A of integers, find the maximum of j-i subjected to the : constraint of A[i] < A[j]. : 以前讨论过,忘了 mark 了,ihas1337code 上好像还没整理完。 : 多谢
|
s**x 发帖数: 7506 | 3 how? I do not see how they related.
【在 r*******y 的大作中提到】 : max sum of the subarray
|
i**********e 发帖数: 1145 | 4 http://www.mitbbs.com/article_t/JobHunting/31875095.html
【在 s**x 的大作中提到】 : Given an array A of integers, find the maximum of j-i subjected to the : constraint of A[i] < A[j]. : 以前讨论过,忘了 mark 了,ihas1337code 上好像还没整理完。 : 多谢
|
r*******y 发帖数: 1081 | 5 for example, a1, a2 , a3, a4, a5, then what is a5 - a1 ?
a5 - a1 = (a2 - a1) + (a3 - a2) + (a4 - a3) + (a5 - a4)
it is just a sum of an array
【在 s**x 的大作中提到】 : how? I do not see how they related.
|
h***i 发帖数: 1970 | 6 darksteel算法第二部分的while loop不需要吧,stack最上面的肯定大于或等于数组的
最后一个值,否则的话,他也应该是加入stack了,直接减n - 1 - stack.top就行了,
然后j = stack.top -1,后面也是,直接减就行了。
【在 i**********e 的大作中提到】 : http://www.mitbbs.com/article_t/JobHunting/31875095.html
|
b********r 发帖数: 620 | 7 but it's not asking for the biggest difference between a given pair of
integers
【在 r*******y 的大作中提到】 : for example, a1, a2 , a3, a4, a5, then what is a5 - a1 ? : a5 - a1 = (a2 - a1) + (a3 - a2) + (a4 - a3) + (a5 - a4) : it is just a sum of an array
|
P**********c 发帖数: 3417 | 8 No. It is the longest increasing subsequence problem.
http://en.wikipedia.org/wiki/Longest_increasing_subsequence
【在 r*******y 的大作中提到】 : max sum of the subarray
|