Difficulty Level : Easy
Submissions : 145
Asked In :
Marks :10
: 0 | : 0
Given an array of integers, find the subarray with the maximum sum, and output it's sum.
A subarray is a contiguous segment of an array.
First line contains N, the size of the array. (1<= N <=1e5)
Next line contains N space separated integers Ai, (-1e4<= Ai <=1e4)
Output a Single Integer, the sum of the subarray with maximum sum.
9 -2 1 -3 4 -1 2 1 -5 4
6
The subarray [4 -1 2 1] will have the max sum, that is 6.
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.