Max Sum Sub Array
generalized