Max Consecutive Sum

The problem: Find the maximum sum possible from picking a contiguous subsequence of an array.

[-1, 5, 6, -2, 20, -50, 4]
What is the largest sum of contiguous elements available in this list?

In the example above, the maximum sum would be 29: [-1, 5, 6, -2, 20, -50, 4], because (5 + 6 - 2 + 20 = 29). End one element later and you'll go negative. Start one element earlier and you'll subtract one.