You're given an array containing both positive and negative integers and required to find the subarray with the largest sum
l*t
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
3 楼
不用DP,O(N)就够了吧。
【在 l***t 的大作中提到】 : Dynamic programming.
c*t
4 楼
It's DP with O(N) time.
【在 P***t 的大作中提到】 : 不用DP,O(N)就够了吧。
P*t
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
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
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