k***i 发帖数: 2 | 1 You're given an array containing both positive and negative integers and
required to find the subarray with the largest sum |
l***t 发帖数: 81 | 2 Dynamic programming.
【在 k***i 的大作中提到】 : You're given an array containing both positive and negative integers and : required to find the subarray with the largest sum
|
P***t 发帖数: 1006 | 3 不用DP,O(N)就够了吧。
【在 l***t 的大作中提到】 : Dynamic programming.
|
c*****t 发帖数: 1879 | 4 It's DP with O(N) time.
【在 P***t 的大作中提到】 : 不用DP,O(N)就够了吧。
|
P***t 发帖数: 1006 | 5 I don't think the method is clearly a DP method. By definition, DP is to
divide the problem with sub problems. But the solution doesn't have much to
do with sub problems.
【在 c*****t 的大作中提到】 : It's DP with O(N) time.
|
N*********y 发帖数: 105 | 6 You are wrong. Think in the way of DP, don't just remember the definition of
DP.
to
【在 P***t 的大作中提到】 : I don't think the method is clearly a DP method. By definition, DP is to : divide the problem with sub problems. But the solution doesn't have much to : do with sub problems.
|
P***t 发帖数: 1006 | 7 Tell me how you define subproblem here. And how your subproblem will be used
more than once to solve bigger problems.
of
【在 N*********y 的大作中提到】 : You are wrong. Think in the way of DP, don't just remember the definition of : DP. : : to
|