How to Attempt?
2 #include
Max Contiguous Sequences
3
// Read
int Fin
(
5
Given an array of N integers, determine all contiguous subsequences of positive numbers. Then write a function to find the sum of elements in each sub-sequence and output the maximum sum value.
6
7
B
9
Input Specification:
input1: An integer N denoting length of array
10
}
input2: An integer array of length N (-10000 <= A[i] <= 10000)
Output Specification: 31 87
Return the maximum sum of contiguous sub-sequence of numbers
0407 Example 1:
input1:5
input2: (1,2,4,-2,3)