I was looking into this problem the other day and found this:
http://www.algorithmist.com/index.php/Kadane's_Algorithm
Kadane's algorithm to find the maximum continuous subarray.

The basic idea is to maintain the largest sum ending at each location
in the array. and max which holds the maximum so far.


On Sep 17, 11:41 am, Raj Jagvanshi <raj.jagvan...@gmail.com> wrote:
> a[] = {4,1,2,3,4,5,40,41,19,20};
>
> print = 40 , 41
> sum  = 81;
>
> give me code

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to