Thanks for explaining. Instead of pure DP, I went ahead with DP+Greedy approach by initially preparing the max sub-array sum similar to what you explained here. However, next I built a left max sub-array & right sub-array; Furthermore, the solution was retrieved by optimally choosing the middle sub-array! Anyway, I have plan to learn the approach that you explained too.
thanks for helping.
Well Explained!!
Thanks for explaining.
Instead of pure DP, I went ahead with DP+Greedy approach by initially preparing the max sub-array sum similar to what you explained here. However, next I built a left max sub-array & right sub-array;
Furthermore, the solution was retrieved by optimally choosing the middle sub-array!
Anyway, I have plan to learn the approach that you explained too.
Excellent