maximum_subarray Function on Algorithm Page 91