16.17 - Contiguous Sequence

You are given an array of integers (both positive and negative). Find the contiguous sequence with the largest sum. Return the sum. EXAMPLE Input: 2, -8, 3, -2, 4, -10 Output: 5 (i.e., (3, -2, 4})

Last updated