Hi /v/code! Here's another classic coding problem:
Given an array of integers, return the maximum contiguous subsequence sum. A contiguous subsequence is simply an unbroken sequence of the elements of the array.
[2, -6, 3, 5, -1 4]
Example output: 11
Reason: The maximum contiguous subsequence sum comes from [3, 5, -1, 4], which sums to 11.
I've included an untested solution in the comments (not sure it's right). Feel free to add your own solution, even if it's identical. Cheers!