use dynamic programming to get array maximum summation in its sub arrays