Analysis
- Dynamic Programming problem
- Let f[i] denote the the maximum subarray value of the substring ending at i-th element,
- f[i] = f[i-1]>0 ? f[i-1]+A[i] : A[i]
- Like breadth first search state compress can be used because only the most previous one result is used
No comments:
Post a Comment
Enter you comment