title: How to find the largest sum of consecutive terms of sequence of n positive and negative numbers?
body: <p>I was trying to solve this problem by splitting into halves and finding the largest sum in each. I used MegaSort. But I'm stuck on how to record and return back the largest sum from each recursive functions.
  For example, </p>
  
  <p>[1, -3, 4, -7, 8] -> the largest sum should be 8.(Sum of itself)</p>
  
  <p>[5,5, -3,6, -10] -> the largest sum should be 5 + 5 + (-3) + 6 = 13</p>
  
  <p>[3, -9, 10, 5] -> the largest sum is 10 + 5 = 15</p>
  
  <pre><code> def find_max(seq):
       if len(seq) == 1:
          if(seq[0] &gt; sum):
             sum = seq[0]
          return seq
       else:
          mid = len(seq)//2
          left = [:seq]
          right = [seq:]
          find_max(left)
          find_max(right)
  </code></pre>