結果 : maximum subarray sum algorithm