companies 29: Given a number N followed by N numbers(negative or positive) print the maximum sum of any subarray of the array.
Created 2 years ago
178
Views
2
Comments
Given a number N followed by N numbers(negative or positive) print the maximum sum of any subarray of the array.
Input Size : 1 <= N <= 100000
Sample Testcases :
INPUT
7
1 2 3 4 5 6 7
OUTPUT
28
Can someone explain the problem? How to form the subarrays?