Back

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
SaikatXarcTN
@SaikatXarcTN
SaikatXarcTN
@SaikatXarcTNProfile is locked. Login

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?

Comments (2)
Please login to comment.