0% found this document useful (0 votes)
1 views1 page

Largest Sum - Contiguous Subarray

Uploaded by

zainabtanweer123
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views1 page

Largest Sum - Contiguous Subarray

Uploaded by

zainabtanweer123
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ASKED IN

Google

LARGEST SUM
CONTIGUOUS SUBARRAY

Given an array arr[] of size N. The task


is to find the sum of the contiguous
subarray within a arr[] with the largest
sum.

Input :
arr[] = { -2, -3, 4, -1, -2, 1, 5, -3 }

Output : 7

Explanation:
Subarray: { 4, -1, -2, 1, 5 } will give max
sum.

If not able to solve then


SEARCH Coding Mafia on Google.

You might also like