Intern — Middle+
The largest sum of consecutive array elements
livecode
Task condition
It is necessary to determine a continuous subarray in a given array of numbers, where the sum of elements reaches the maximum value, and return this sum. If all elements of the array are negative, return 0.